Browze_Ya
Умник
Добрый день,обитатели P-I.У меня такой вопрос:
Почему в команде /changeskin,когда лидер меняет одежду игроку,а потом увольняет-она остается,как это исправить?
Case
Command
Command /uninvire
Почему в команде /changeskin,когда лидер меняет одежду игроку,а потом увольняет-она остается,как это исправить?
Case
PHP:
case 2351:
{
if(response)
{
switch(listitem)
{
case 0: // ÑÊÈÍ ¹1
{
switch(PlayerInfo[playerid][pMember])
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 98);//Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 98);//Ïðàâèòåëüñòâî
case 5: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 295);// ÌÎ
case 6..8: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 255);// Àðìèè
case 9: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 294);// ÌÂÄ
case 10..12: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 265);// Ïîëèöèÿ
case 13: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 286);// ÔÁÐ
case 14: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 295);//ÑÌÈ ÓÏÐÎÂË
case 15..17: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 170);//ÑÌÈ
case 18: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 274); //Ìåäèêè
case 19: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 105); //ãðóâ
case 20: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 102); //Áàëëàñ
case 21: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 175); //ÐèÔÀ
case 22: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 116); //Àçòåêè
case 23: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 108); //Âàãîñû
case 24: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 98); // ËÊÍ
case 25: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 112); //Ðóññêàÿ Ìàôèÿ
case 26: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 121); //ßêè
case 27: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 216); //Ìåäèêè ÌÈÍÈÑÒ
case 28..29: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 274); //Ìåäèêè
case 30: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 170);//ÑÌÈ ÒÂ
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
case 1:// ÑÊÈÍ ¹2
{
switch(PlayerInfo[playerid][pMember])
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 164); //Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 164); //Ïðàâèòåëüñòâî
case 5: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 191); //ÌÎ
case 6..8: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 61); // Àðìèè
case 9: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 93);// ÌÂÄ
case 10..12: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 266);// Ïîëèöèÿ
case 13: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 164);// ÔÁÐ
case 14: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 233);//ÑÌÈ ÓÏÐÎÂË
case 15..17: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 250);//ÑÌÈ
case 18: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 276); //Ìåäèêè
case 19: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 106); //ãðóâ
case 20: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 103); //Áàëëàñ
case 21: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 174); //ÐèÔÀ
case 22: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 114); //Àçòåêè
case 23: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 110); //Âàãîñû
case 24: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 124); // ËÊÍ
case 25: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 125); //Ðóññêàÿ Ìàôèÿ
case 26: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 122); //ßêè
case 27: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 295); //Ìåäèêè ÌÈÍÈÑÒ
case 28..29: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 276); //Ìåäèêè
case 30: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 250);//ÑÌÈ ÒÂ
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
case 2:// ÑÊÈÍ ¹3
{
switch(PlayerInfo[playerid][pMember])
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 165); //Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 165); //Ïðàâèòåëüñòâî
case 6..8: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 287); // Àðìèè
case 10..12: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 267);// Ïîëèöèÿ
case 13: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 163);// ÔÁÐ
case 15..17: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 188);//ÑÌÈ
case 18: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 275); //Ìåäèêè
case 19: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 107); //ãðóâ
case 20: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 104); //Áàëëàñ
case 21: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 173); //ÐèÔÀ
case 22: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 115); //Àçòåêè
case 23: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 109); //Âàãîñû
case 24: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 127); // ËÊÍ
case 25: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 46); //Ðóññêàÿ Ìàôèÿ
case 26: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 123); //ßêè
case 28..29: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 275); //Ìåäèêè
case 30: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 188);//ÑÌÈ ÒÂ
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
case 3:// ÑÊÈÍ ¹4
{
switch(PlayerInfo[playerid][pMember])
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 185); //Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 185); //Ïðàâèòåëüñòâî
case 6..8: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 191); // Àðìèè
case 10..12: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 280);// Ïîëèöèÿ
case 13: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 165);// ÔÁÐ
case 15..17: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 187);//ÑÌÈ
case 18: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 70); //Ìåäèêè
case 19: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 195); //ãðóâ
case 20: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 195); //Áàëëàñ
case 21: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 226); //ÐèÔÀ
case 22: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 193); //Àçòåêè
case 23: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 56); //Âàãîñû
case 24: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 216); // ËÊÍ
case 25: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 233); //Ðóññêàÿ Ìàôèÿ
case 26: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 169); //ßêè
case 28..29: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 70); //Ìåäèêè
case 30: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 187);//ÑÌÈ ÒÂ
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
case 4:// ÑÊÈÍ ¹5
{
switch(PlayerInfo[playerid][pMember])//case 1..4 ýòî çíà÷èò ñ 1 ïî 4 ôðàêöèþ îäèíàêîâûå ñêèíû
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 59); //Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 59); //Ïðàâèòåëüñòâî
case 10..12: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 281);// Ïîëèöèÿ
case 13: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 166);// ÔÁÐ
case 15..17: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 186);//ÑÌÈ
case 18: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 148); //Ìåäèêè
case 19: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 269); //ãðóâ
case 21: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 273); //ÐèÔÀ
case 22: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 292); //Àçòåêè
case 24: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 113); // ËÊÍ
case 25: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 111); //Ðóññêàÿ Ìàôèÿ
case 26: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 186); //ßêè
case 28..29: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 148); //Ìåäèêè
case 30: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 186);//ÑÌÈ ÒÂ
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
case 5:// ÑÊÈÍ ¹6
{
switch(PlayerInfo[playerid][pMember])//case 1..4 ýòî çíà÷èò ñ 1 ïî 4 ôðàêöèþ îäèíàêîâûå ñêèíû
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 240); //Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 240); //Ïðàâèòåëüñòâî
case 10..12: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 282);// Ïîëèöèÿ
case 13: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 192);// ÔÁÐ
case 15..17: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 223);//ÑÌÈ
case 19: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 270); //ãðóâ
case 24: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 93); // ËÊÍ
case 25: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 126); //Ðóññêàÿ Ìàôèÿ
case 26: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 120); //ßêè
case 30: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 223);//ÑÌÈ ÒÂ
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
case 6:// ÑÊÈÍ ¹7
{
switch(PlayerInfo[playerid][pMember])//case 1..4 ýòî çíà÷èò ñ 1 ïî 4 ôðàêöèþ îäèíàêîâûå ñêèíû
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 187); //Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 187); //Ïðàâèòåëüñòâî
case 10..12: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 283);// Ïîëèöèÿ
case 15..17: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 150);//ÑÌÈ
case 19: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 271); //ãðóâ
case 25: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 91); //Ðóññêàÿ Ìàôèÿ
case 26: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 12); //ßêè
case 30: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 150);//ÑÌÈ ÒÂ
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
case 7:// ÑÊÈÍ ¹8
{
switch(PlayerInfo[playerid][pMember])//case 1..4 ýòî çíà÷èò ñ 1 ïî 4 ôðàêöèþ îäèíàêîâûå ñêèíû
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 17); //Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 17); //Ïðàâèòåëüñòâî
case 10..12: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 284);// Ïîëèöèÿ
case 15..17: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 141);//ÑÌÈ
case 19: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 149); //ãðóâ
case 26: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 294); //ßêè
case 30: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 141);//ÑÌÈ ÒÂ
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
case 8:// ÑÊÈÍ ¹9
{
switch(PlayerInfo[playerid][pMember])//case 1..4 ýòî çíà÷èò ñ 1 ïî 4 ôðàêöèþ îäèíàêîâûå ñêèíû
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 147); //Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 227); //Ïðàâèòåëüñòâî
case 10..12: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 285);// Ïîëèöèÿ
case 19: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 86); //ãðóâ
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
case 9:// ÑÊÈÍ ¹10
{
switch(PlayerInfo[playerid][pMember])//case 1..4 ýòî çíà÷èò ñ 1 ïî 4 ôðàêöèþ îäèíàêîâûå ñêèíû
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 150); //Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 150); //Ïðàâèòåëüñòâî
case 10..12: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 288);// Ïîëèöèÿ
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
case 10:// ÑÊÈÍ ¹11
{
switch(PlayerInfo[playerid][pMember])//case 1..4 ýòî çíà÷èò ñ 1 ïî 4 ôðàêöèþ îäèíàêîâûå ñêèíû
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 141); //Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 141); //Ïðàâèòåëüñòâî
case 10..12: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 192);// Ïîëèöèÿ
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
case 11:// ÑÊÈÍ ¹12
{
switch(PlayerInfo[playerid][pMember])//case 1..4 ýòî çíà÷èò ñ 1 ïî 4 ôðàêöèþ îäèíàêîâûå ñêèíû
{
case 1: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 219); //Àäì ïðèçèäåíò -_-
case 2..4: SetPlayerSkin(GetPVarInt(playerid,"SKIN"), 219); //Ïðàâèòåëüñòâî
}
PlayerInfo[GetPVarInt(playerid,"SKIN")][pChar] = GetPlayerSkin(GetPVarInt(playerid,"SKIN"));
}
}
}
}
case 700:
{
if(response)
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if(PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
if(GetPlayerVirtualWorld(playerid) == i+50)
{
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
}
}
}
}
}
PHP:
if(strcmp(cmd,"/changeskin",true)==0)
{
if(PlayerInfo[playerid][pLeader] >= 1 || PlayerInfo[playerid][pRank] >= 6)
{
new skinid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SCM(playerid, -1, " Ââåäèòå: /changeskin [ID]");
skinid = ReturnUser(tmp);
new Leader;
if(PlayerInfo[playerid][pLeader] >0) Leader = PlayerInfo[playerid][pLeader];
else Leader = PlayerInfo[playerid][pMember];
if(Leader == PlayerInfo[skinid][pMember]){
SetPVarInt(playerid,"SKIN",skinid);
SPD(playerid, 2351, DIALOG_STYLE_LIST,"Âûäà÷à ñêèíà", "Ñêèí 1\nÑêèí 2\nÑêèí 3\nÑêèí 4\nÑêèí 5\nÑêèí6\nÑêèí7\nÑêèí8\nÑêèí9\nÑêèí10\nÑêèí11\nÑêèí12","Ïðèìåíèòü","Îòìåíà");
return true;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Ýòîò ÷åëîâåê íå â âàøåé ôðàêöèè!");
return true;
}
}
return true;
}
PHP:
if(strcmp(cmd, "/uninvite", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "/uninvite [playerid][ïðè÷èíà]");
return 1;
}
new length = strlen(cmdtext);
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GREY, "/uninvite [playerid] [Ïðè÷èíà]");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
if(PlayerInfo[playerid][pLeader] != PlayerInfo[para1][pMember])
{
SendClientMessage(playerid, COLOR_GRAD2, "Èãðîê äîëæåí íàõîäèòüñÿ â âàøåé ôðàêöèè!");
return 1;
}
if (PlayerInfo[playerid][pLeader] >= 1)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMember] > 0)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GPN
format(string, sizeof(string), "Ëèäåð îðãàíèçàöèè %s âûãíàë âàñ èç îðãàíèçàöèè.{FFCCAA}Ïðè÷èíà:%s", playername, (result));
SendClientMessage(para1, COLOR_RED, string);
PlayerInfo[giveplayerid][pMember] = 0;
PlayerInfo[giveplayerid][pLeader] = 0;
PlayerInfo[giveplayerid][pRank] = 0;
SetPlayerArmour(giveplayerid, 0);
DelGun(giveplayerid);
FormaFrac[giveplayerid] = 0;
SetPlayerColor(giveplayerid, TEAM_HIT_COLOR);
SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pChar]);
//SpawnPlayer(para1);
format(string, sizeof(string), "Âû âûãíàëè %s èç ñâîåé îðãàíèçàöèè.Ïðè÷èíà: %s.", giveplayer, (result));
SendClientMessage(playerid, COLOR_GREEN, string);
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Âû íå ëèäåð.");
}
}
return 1;
}
Последнее редактирование:
