Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; 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] = 3; gTeam[para1] = 3; ftext = "SWAT"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }
- else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 4; gTeam[para1] = 4; ftext = "NG Racers"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
- else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "The Italian Mafia"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
- else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "Triad Mafia"; ChosenSkin[para1] = 123; SetPlayerSkin(para1, 123); }
- else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Grove Street Family"; ChosenSkin[para1] = 270; SetPlayerSkin(para1, 270); }
- else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 8; gTeam[para1] = 8; ftext = "Hitman Agencija"; ChosenSkin[para1] = 186; SetPlayerSkin(para1, 186); }
- else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 9; gTeam[para1] = 9; ftext = "CNN Studio"; ChosenSkin[para1] = 187; SetPlayerSkin(para1, 187); }
- else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 10; ftext = "Taxi Kompanija"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
- else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 11; gTeam[para1] = 11; ftext = "UnderGround Racers"; ChosenSkin[para1] = 217; SetPlayerSkin(para1, 217); }
- 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] = 13; gTeam[para1] = 13; ftext = "East Side Locos"; ChosenSkin[para1] = 116; SetPlayerSkin(para1, 116); }
- else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Medic departmet"; ChosenSkin[para1] = 116; SetPlayerSkin(para1, 116); }
- else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Russian Mafia"; ChosenSkin[para1] = 116; SetPlayerSkin(para1, 116); }
- else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 16; ftext = "Yakuza"; ChosenSkin[para1] = 116; SetPlayerSkin(para1, 116); }
- 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_GRAD1, " Nisi ovlasten(lideri samo)!");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment