[POMOC] Invite i Accept

Započeo []Flynâ„¢, Februar 05, 2011, 00:25:31 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Ovako...Pokusavao sam da napravim da kad Lider nekog igraca pozove u Organizaciju/Mafiju/Bandu da taj igrac mora da prihvati.. Ali nisam uspeo pa ako neko hoce da mi to narpavi ? Evo komanda /invite | PS: Ako moze u ZCMD i Sscanf ...

if(strcmp(cmd, "/invite", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Komanda: /invite [IgracevID/DeoImena]");
return 1;
}
new para1;
new ftext[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][Lider] >= 1)
{
   if(IsPlayerConnected(para1))
   {
       if(para1 != INVALID_PLAYER_ID)
       {
   if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][Clan] == 0 && PlayerInfo[para1][pFMember] == 255)
   {
       if(PlayerInfo[para1][pJob] > 0)
       {
           SendClientMessage(playerid, SIVA, "Taj igrac ima posao !");
           return 1;
       }
       if(PlayerInfo[playerid][Lider] == 1)
{
PlayerInfo[para1][pTeam] = 1;
gTeam[para1] = 2;
ftext = "Policija";
ChosenSkin[para1] = 280;
SetPlayerSkin(para1, 280);
}
       else if(PlayerInfo[playerid][Lider] == 2)
{
PlayerInfo[para1][pTeam] = 1;
gTeam[para1] = 2;
ftext = "F.B.I";
ChosenSkin[para1] = 286;
SetPlayerSkin(para1, 286);
}
       else if(PlayerInfo[playerid][Lider] == 3)
{
PlayerInfo[para1][pTeam] = 1;
gTeam[para1] = 2;
ftext = "Ballas";
ChosenSkin[para1] = 102;
SetPlayerSkin(para1, 102);
}
       else if(PlayerInfo[playerid][Lider] == 4)
{
PlayerInfo[para1][pTeam] = 1;
gTeam[para1] = 1;
ftext = "Hitna Pomoc";
ChosenSkin[para1] = 276;
SetPlayerSkin(para1, 276);
}
       else if(PlayerInfo[playerid][Lider] == 5)
{
PlayerInfo[para1][pTeam] = 5;
gTeam[para1] = 5;
ftext = "Corleone's";
ChosenSkin[para1] = 111;
SetPlayerSkin(para1, 111);
}
       else if(PlayerInfo[playerid][Lider] == 6)
{
PlayerInfo[para1][pTeam] = 5;
gTeam[para1] = 5;
ftext = "Black Dragon Triads";
ChosenSkin[para1] = 117;
SetPlayerSkin(para1, 117);
}
       else if(PlayerInfo[playerid][Lider] == 7)
{
PlayerInfo[para1][pTeam] = 12;
gTeam[para1] = 12;
ftext = "Gradonacelnik";
ChosenSkin[para1] = 228;
SetPlayerSkin(para1, 228);
}
       else if(PlayerInfo[playerid][Lider] == 8)
{
PlayerInfo[para1][pTeam] = 10;
gTeam[para1] = 12;
ftext = "Grove Street";
ChosenSkin[para1] = 105;
SetPlayerSkin(para1, 105);
}
       else if(PlayerInfo[playerid][Lider] == 9)
{
PlayerInfo[para1][pTeam] = 12;
gTeam[para1] = 12;
ftext = "CNN Novinari";
ChosenSkin[para1] = 227;
SetPlayerSkin(para1, 227);
}
       else if(PlayerInfo[playerid][Lider] == 10)
{
PlayerInfo[para1][pTeam] = 12;
gTeam[para1] = 12;
ftext = "Taxi-Co";
ChosenSkin[para1] = 60;
SetPlayerSkin(para1, 60);
}
       else if(PlayerInfo[playerid][Lider] == 11)
{
PlayerInfo[para1][pTeam] = 12;
gTeam[para1] = 12;
ftext = "Hitman Angency";
ChosenSkin[para1] = 294;
SetPlayerSkin(para1, 294);
}
else if(PlayerInfo[playerid][Lider] == 12)
{
PlayerInfo[para1][pTeam] = 12;
gTeam[para1] = 12;
ftext = "Crips";
ChosenSkin[para1] = 116;
SetPlayerSkin(para1, 116);
}
else if(PlayerInfo[playerid][Lider] == 13)
{
PlayerInfo[para1][pTeam] = 12;
gTeam[para1] = 12;
ftext = "Street Racers";
ChosenSkin[para1] = 7;
SetPlayerSkin(para1, 7);
}
else if(PlayerInfo[playerid][Lider] == 14)
{
PlayerInfo[para1][pTeam] = 12;
gTeam[para1] = 12;
ftext = "The Vincie Mafia";
ChosenSkin[para1] = 126;
SetPlayerSkin(para1, 126);
}
else if(PlayerInfo[playerid][Lider] == 15)
{
PlayerInfo[para1][pTeam] = 12;
gTeam[para1] = 12;
ftext = "L.C.N";
ChosenSkin[para1] = 127;
SetPlayerSkin(para1, 127);
}
                           else
{
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][Clan] = PlayerInfo[playerid][Lider];
PlayerInfo[para1][pRank] = 1;
printf("AdmCmd: %s je pozvao %s da se pridrzui %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), "Pridruzio si se %s, Pozvao te je Lider %s", ftext, sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "Pozvao si %s da se pridrzui %s.", giveplayer,ftext);
SendClientMessage(playerid, SVETLOPLAVA, string);
SetPlayerInterior(para1,0);
new rand = random(sizeof(gInviteSpawns));
SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
TogglePlayerControllable(para1, 0);
   SelectChar[para1] = 255;
   SelectCharID[para1] = PlayerInfo[para1][Clan];
   SelectCharPlace[para1] = 1;
   PlayerInfo[para1][pModel] = ChosenSkin[para1];
    PlayerInfo[para1][pChar] = ChosenSkin[para1];
   SendClientMessage(para1, CRVENA, "===============================================");
   SendClientMessage(para1, ZELENA, "Da odaberes skin koristi"COL_ORANGE" KLIK MISA");
   SendClientMessage(para1, ZELENA, "Kada odaberes stisni"COL_ORANGE" SPACE");
   SendClientMessage(para1, CRVENA, "===============================================");
}
else
{
   SendClientMessage(playerid, SIVA, "Taj igrac je vec u nekoj Organizaciji ili ima Wanted.");
   return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Samo Lideri mogu koristiti ovu komandu !");
}
}
return 1;
}
Poslednja Izmena: Februar 05, 2011, 00:25:42 PRE PODNE od joXy