Jump to content

Question

Posted

Poi am comanda /invite functiona bine pana acuma , daca primesti invite nu prmesti respawn!

[pawn] //----------------------------------[iNVITE]------------------------------------------------

if(strcmp(cmd, "/invite", true) == 0)

{

if(IsPlayerConnected(playerid))

{

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /invite [playerid/PartOfName]");

return 1;

}

new para1;

new ftext[20];

para1 = ReturnUser(tmp);

if (PlayerInfo[playerid][pLeader] >= 1)

{

if(IsPlayerConnected(para1))

{

if(para1 != INVALID_PLAYER_ID)

{

if (PlayerInfo[para1][pLeader] == 0 && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)

{

if(PlayerInfo[para1][pPunish] > 0)

{

SendClientMessage(playerid, COLOR_GRAD2, " Can't invite him, player have FactionPunish !");

return 1;

}

if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Force"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }         else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI/ATF"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163); }

else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "National Guard"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }

else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Firemen/Ambulance"; ChosenSkin[para1] = 228; SetPlayerSkin(para1, 228); }

else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "The Triads"; ChosenSkin[para1] = 118; SetPlayerSkin(para1, 111); }

else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "The Mafia"; ChosenSkin[para1] = 124; SetPlayerSkin(para1, 113); }

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] = 165; SetPlayerSkin(para1, 165); }

else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "News Reporter"; ChosenSkin[para1] = 188; SetPlayerSkin(para1, 188); }

else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Cab Company"; ChosenSkin[para1] = 61; SetPlayerSkin(para1, 61); }

else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructors"; ChosenSkin[para1] = 271; SetPlayerSkin(para1, 271); }

else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Grove Street Family"; ChosenSkin[para1] = 270; SetPlayerSkin(para1, 270); }

else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Los Santos Vagos"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }

else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "The Ballas Family"; ChosenSkin[para1] = 104; SetPlayerSkin(para1, 104); }

else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "The Nang Boys"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); }

else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 5; ftext = "Tow Car Company"; ChosenSkin[para1] = 50; SetPlayerSkin(para1, 50); }

else { return 1; }

GetPlayerName(para1, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];

PlayerInfo[para1][pRank] = 1;

PlayerInfo[para1][pFwarn] = 0;

printf("AdmCmd: %s has invited %s to join %s.", sendername, giveplayer, ftext);

format(string, sizeof(string), " You have Joined the %s, you were invited by Leader %s", ftext, sendername);

SendClientMessage(para1, COLOR_WHITE, string);

format(string, sizeof(string), " You have Invited %s to join the %s.", giveplayer,ftext);

SendClientMessage(playerid, COLOR_WHITE, string);

}

else

{

SendClientMessage(playerid, COLOR_GREY, " That player is currently Wanted/a Different Team/or already a Family Member.");

return 1;

}

}

}//not connected

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command(leaders only)!");

}

}

return 1;

} [/pawn]

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.