[Tut] Komanda /acceptinvite

Započeo [LC-RP]D@rkâ„¢, Jun 12, 2013, 18:53:00 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Komande su strcmp zato sto mnogi neznaju da rade sa zcmd,dcmd itd.I komanda je iskljucivo za RP modove tacnije FactionGame RP i Balkan Underground.I na modove koje ste editali od ovih modova.Ili nekih drugih zato tacno slusajte savete ispod i nece biti problema

Na vrhu skripte dodati ovo

new GettingOrg[MAX_PLAYERS];

Ovo ubaciti u "OnPlayerConnect"

GettingOrg[playerid] = 0;

Ovo dodati u svoje komande
if(strcmp(cmd, "/invite", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_GRAD2, "Koriscenje: /invite [ID Igraca/Dio Imena]");
return 1;
}
new para1;
new ftext[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
    if(IsPlayerConnected(para1))
    {
if(PlayerInfo[para1][pLevel] < 2)
{
SCM(playerid, COLOR_GREY, "   Igrac mora biti minimum lvl 2! ");
return 1;
}
        if(para1 != INVALID_PLAYER_ID)
        {
    if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
    {
        if(PlayerInfo[playerid][pLeader] == 1) { ftext = "LS-PD"; }
        else if(PlayerInfo[playerid][pLeader] == 2) { ftext = "FBI Agent"; }
        else if(PlayerInfo[playerid][pLeader] == 3) { ftext = "S.W.A.T"; }
        else if(PlayerInfo[playerid][pLeader] == 4) { ftext = "Hitna Pomoc"; }
        else if(PlayerInfo[playerid][pLeader] == 5) { ftext = "Wu Tang Family";  }
        else if(PlayerInfo[playerid][pLeader] == 6) { ftext = "La Cosa Nostra"; }
        else if(PlayerInfo[playerid][pLeader] == 7) { ftext = "Vlada"; }
        else if(PlayerInfo[playerid][pLeader] == 8) { ftext = "KGB Mafija"; }
        else if(PlayerInfo[playerid][pLeader] == 9) { ftext = "CNN"; }
        else if(PlayerInfo[playerid][pLeader] == 10) { ftext = "TAXI"; }
        else if(PlayerInfo[playerid][pLeader] == 11) { ftext = "Parking Servis"; }
        else if(PlayerInfo[playerid][pLeader] == 12) { ftext = "Fast & Furious"; }
        else if(PlayerInfo[playerid][pLeader] == 13) { ftext = "Ballas Family"; }
        else if(PlayerInfo[playerid][pLeader] == 14) { ftext = "Grove Street Family"; }
        else if(PlayerInfo[playerid][pLeader] == 15) { ftext = "Los Santos Vagos"; }
        else if(PlayerInfo[playerid][pLeader] == 16) { ftext = "Varrios Los Azectas"; }
        else if(PlayerInfo[playerid][pLeader] == 17) { ftext = "CIA"; }
        else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GettingOrg[para1] = PlayerInfo[playerid][pLeader];
printf("AdmCmd: %s je pozvao %s-a da se pridruzi %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), "   Lider {FFFFFF}%s{00C0FF} vas je pozvao da se pridruzite {FFFFFF}%s.", sendername,ftext);
SCM(para1, 0x00C0FFFF, string);
SCM(para1, 0x00C0FFFF, "   Da prihvatite njegov poziv kucajte {FFFFFF}/acceptinvite.");
format(string, sizeof(string), "   Pozvali ste %s-a da se pridruzi %s.", giveplayer,ftext);
SCM(playerid, COLOR_WHITE, string);
}
else
{
    SCM(playerid, COLOR_GREY, "  Taj igrac ima wanted level/ u drugom je timu/ ili je vec clan neke organizacije.");
    return 1;
}
}
}//not connected
}
else
{
SCM(playerid, COLOR_GRAD1, "   Niste ovlasteni da koristite tu komadnu(samo lideri!!)!");
}
}
return 1;
}

Znaci nikako preko ove komande /invite pastirati svoju nego samo ove organizacije menjati prema svojima zato sto ima komanda /invite jos nesto svoje sto sam ja dodo i ako to obrisete nece vam raditi

Komanda /acceptinvite
if(strcmp(cmd, "/acceptinvite", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(PlayerInfo[playerid][pMember] == 0)
{
    if (GettingOrg[playerid] == 14)
{
SetPlayerSkin(playerid, 105);
    PlayerInfo[playerid][pMember] = 14;
PlayerInfo[playerid][pRank] = 1;
}
else if (GettingOrg[playerid] == 1)
{
SetPlayerSkin(playerid, 71);
    PlayerInfo[playerid][pMember] = 1;
PlayerInfo[playerid][pRank] = 1;
}
else if (GettingOrg[playerid] == 2)
{
SetPlayerSkin(playerid, 286);
    PlayerInfo[playerid][pMember] = 2;
PlayerInfo[playerid][pRank] = 1;
}
else if (GettingOrg[playerid] == 3)
{
SetPlayerSkin(playerid, 287);
    PlayerInfo[playerid][pMember] = 3;
PlayerInfo[playerid][pRank] = 1;
}
else if (GettingOrg[playerid] == 4)
{
SetPlayerSkin(playerid, 70);
    PlayerInfo[playerid][pMember] = 4;
PlayerInfo[playerid][pRank] = 1;
}
else if (GettingOrg[playerid] == 5)
{
SetPlayerSkin(playerid, 24);
    PlayerInfo[playerid][pMember] = 5;
PlayerInfo[playerid][pRank] = 1;
}
else if (GettingOrg[playerid] == 6)
{
SetPlayerSkin(playerid, 125);
    PlayerInfo[playerid][pMember] = 6;
PlayerInfo[playerid][pRank] = 1;
}
  else if (GettingOrg[playerid] == 7)
{
SetPlayerSkin(playerid, 120);
    PlayerInfo[playerid][pMember] = 7;
PlayerInfo[playerid][pRank] = 1;
}
  else if (GettingOrg[playerid] == 8)
{
SetPlayerSkin(playerid, 111);
    PlayerInfo[playerid][pMember] = 8;
PlayerInfo[playerid][pRank] = 1;
}
  else if (GettingOrg[playerid] == 9)
{
SetPlayerSkin(playerid, 16);
    PlayerInfo[playerid][pMember] = 9;
PlayerInfo[playerid][pRank] = 1;
}
  else if (GettingOrg[playerid] == 10)
{
SetPlayerSkin(playerid, 255);
    PlayerInfo[playerid][pMember] = 10;
PlayerInfo[playerid][pRank] = 1;
}
  else if (GettingOrg[playerid] == 11)
{
SetPlayerSkin(playerid, 16);
    PlayerInfo[playerid][pMember] = 11;
PlayerInfo[playerid][pRank] = 1;
}
  else if (GettingOrg[playerid] == 12)
{
SetPlayerSkin(playerid, 25);
    PlayerInfo[playerid][pMember] = 12;
PlayerInfo[playerid][pRank] = 1;
}
  else if (GettingOrg[playerid] == 13)
{
SetPlayerSkin(playerid, 102);
    PlayerInfo[playerid][pMember] = 13;
PlayerInfo[playerid][pRank] = 1;
}
  else if (GettingOrg[playerid] == 15)
{
SetPlayerSkin(playerid, 108);
    PlayerInfo[playerid][pMember] = 15;
PlayerInfo[playerid][pRank] = 1;
}
else if (GettingOrg[playerid] == 16)
{
SetPlayerSkin(playerid, 114);
    PlayerInfo[playerid][pMember] = 16;
PlayerInfo[playerid][pRank] = 1;
}
}
else
{
    SCM(playerid, COLOR_GREY, "   Vec Imate organizaciju !");
}
}//not connected
    return 1;
}

Poslednja Izmena: Jun 12, 2013, 21:27:07 POSLE PODNE od D@rkâ„¢

kopirano iz nekog moda i + na komandi /invite daje igracu skin vec sto je glupo sta ako ne prihvati ostane mu skin :S

da da da hvala nisam video evo sacu ispraviti al nije kopirano iz nikakvog moda mozda ima slicno al stvr nisam copy.A pre ovoga trazio sam tut za ovo nisam ga nige naso.
Poslednja Izmena: Jun 12, 2013, 21:28:38 POSLE PODNE od D@rkâ„¢

Citat: D@rkâ,,¢ poslato Jun 12, 2013, 20:27:12 POSLE PODNE
da da da hvala nisam video evo sacu ispraviti al nije kopirano iz nikakvog moda mozda ima slicno al stvr nisam copy
nisi ? objasni onda ovoif(strcmp(cmd, "/invite", true) == 0)

Nista objasnjeno :P




Balkan Ulice RPG opis servera: Click



-Tutorial za mijesanje ID-ova na vozilima: Click

momci su sve rekli...


[FS]Rent
[FS] Vremenska prognoza
[TuT] PayDay
[TuT]PayDay sistem[UPDATED]
Moja Biografija

Respect:Mr.Gagi,FlasH,Streetboy,David (Sabljak) A.k.A SABO(T)
ÄŒovjek nije stvoren za poraze, moze biti unisten, ali ne i pobjeÄ'en!

Kopirano iz nekog moda,nista objasnjeno 2/10 makar za trud sto si napisao