[Pomoc] Invite

Započeo Petar Pan, Jul 24, 2011, 18:53:14 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:PG
Detaljan opis problema:Stavio sam u komandu /invite za ciu radi al ovo izbacuje
Neke slike/video za lakse dobivanje pomoci(neobavezno):http://www.xfire.com/video/4ae15d/

Komanda invite:

CMD:invite(playerid, params[])
{
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new string[128];
new idx;

   if(IsPlayerConnected(playerid))
   {
temp = strtok(params, idx);
if(!strlen(temp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /invite {959561}[ID/DioImena] {838361}");
return 1;
}
new para1;
new ftext[20];
para1 = ReturnUser(temp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
   if(IsPlayerConnected(para1))
   {
       if(para1 != INVALID_PLAYER_ID)
       {
  // if (PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pLeader] == 0)
//   {
     
       if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Department"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
       else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
       else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "National Guard"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
       else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Medical Department"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
       else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 120); }
       else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 120; SetPlayerSkin(para1, 258); }
       else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
       else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Hitman Agency"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127); }
       else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "CNN Studio"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
       else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Cab Company"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
       else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructors"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
                           else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Mara Salvatrucha"; ChosenSkin[para1] = 110; SetPlayerSkin(para1, 110); }
                           else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Crips"; ChosenSkin[para1] = 104; SetPlayerSkin(para1, 104); }
                           else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 1; ftext = "CIA"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163); }
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
printf("%s je pozvao igraca %s da se prikljuci %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), "   Prikljucio si se %s, pozvao te lider %s", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "   Pozvao si %s da se pridruzi %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, 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][pMember];
   SelectCharPlace[para1] = 1;
OdjecaID1[para1] = 1;
   PlayerInfo[para1][pModel] = ChosenSkin[para1];
    PlayerInfo[para1][pChar] = ChosenSkin[para1];
   SendClientMessage(para1, COLOR_LIGHTRED, "* Koristi Lijevi klik misa da biras skin.");
   SendClientMessage(para1, COLOR_LIGHTRED, "* Kada odaberes koristi C na tipkovnici.");
// }
//else
//{
//    SendClientMessage(playerid, COLOR_GREY, "  Taj igrac je vec u Mafiji/organizaciji.");
//    return 1;
//}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Nisi ovlasten(lideri samo)!");
}
}
return 1;
}
Poslednja Izmena: Jul 24, 2011, 18:54:40 POSLE PODNE od Petar Pan

daj OnPlayerSpawn
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √