06.12.2013, 16:22
olб gente!, eu crie um gm, mais estou com muita dificuldade em setar o Player para [pProcurados] alguem pode me ajudar ?, Obrigado
if(PlayerInfo[playerid][pProcurado] >= 1)
{
if(PlayerInfo[killerid][pBOPE] >= 1 || PlayerInfo[killerid][pPMS] >= 1)
{
if(EmTrabalho[killerid] == 1)
{
if(PlayerInfo[playerid][pPresoLS] >= 1)
{
return 1;
}
new string[200];
GameTextForPlayer(playerid, "~r~Preso!", 2500, 3);
GameTextForPlayer(killerid, "~r~Suspeito abatido!", 2500, 3);
GivePlayerMoney(killerid, 100);
PlayerInfo[playerid][pPresoLS] = 1;
SetPlayerWantedLevel(playerid, 0);
new pName1[24];
new pName2[24];
GetPlayerName(playerid, pName1, 24);
GetPlayerName(killerid, pName2, 24);
format(string, sizeof(string), "<< O procurado da justiзa %s foi preso pelo Polнcial %s >>", pName1, pName2);
SendClientMessageToAll(COLOR_KICK,string);
if(PlayerInfo[playerid][pProcurado] == 1)
{
PlayerInfo[playerid][pTempoPreso] = 180;
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pProcurado] == 2)
{
PlayerInfo[playerid][pTempoPreso] = 240;
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pProcurado] == 3)
{
PlayerInfo[playerid][pTempoPreso] = 300;
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pProcurado] == 4)
{
PlayerInfo[playerid][pTempoPreso] = 400;
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pProcurado] == 5)
{
PlayerInfo[playerid][pTempoPreso] = 500;
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pProcurado] >= 6)
{
PlayerInfo[playerid][pTempoPreso] = 900;
SpawnPlayer(playerid);
}
PlayerInfo[playerid][pProcurado] = 0;
}
}
if(PlayerInfo[killerid][pBOPE] >= 1 || PlayerInfo[killerid][pPMS] >= 1)
{
if(EmTrabalho[killerid] == 1)
{
if(PlayerInfo[playerid][pPresoSF] >= 1)
{
return 1;
}
new string[200];
GameTextForPlayer(playerid, "~r~Preso!", 2500, 3);
GameTextForPlayer(killerid, "~r~Suspeito abatido!", 2500, 3);
GivePlayerMoney(killerid, 100);
PlayerInfo[playerid][pPresoSF] = 1;
SetPlayerWantedLevel(playerid, 0);
new pName1[24];
new pName2[24];
GetPlayerName(playerid, pName1, 24);
GetPlayerName(killerid, pName2, 24);
format(string, sizeof(string), "<< O procurado da justiзa %s foi preso pelo Polнcial %s >>", pName1, pName2);
SendClientMessageToAll(COLOR_KICK,string);
if(PlayerInfo[playerid][pProcurado] == 1)
{
PlayerInfo[playerid][pTempoPreso] = 180;
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pProcurado] == 2)
{
PlayerInfo[playerid][pTempoPreso] = 240;
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pProcurado] == 3)
{
PlayerInfo[playerid][pTempoPreso] = 300;
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pProcurado] == 4)
{
PlayerInfo[playerid][pTempoPreso] = 400;
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pProcurado] == 5)
{
PlayerInfo[playerid][pTempoPreso] = 500;
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pProcurado] >= 6)
{
PlayerInfo[playerid][pTempoPreso] = 900;
SpawnPlayer(playerid);
}
PlayerInfo[playerid][pProcurado] = 0;
}
}
}
CMD:su(playerid, params[])
{
new giveplayerid, level;
if(sscanf(params, "ui", giveplayerid, level)) return SendClientMessage(playerid, COLOR_WHITE, "* USE: /su [id] [level]");
SetPlayerWantedLevel(giveplayerid, level);
PlayerInfo[giveplayerid][pProcurado] += level;
}
if(!strcmp(cmd, "/su", true))
{
if(PlayerInfo[playerid][pPMBA] >= 1 || PlayerInfo[playerid][pPMS] >= 1) {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "use /suspeito id");
new suspeito = strval(tmp);
if(!IsPlayerConnected(suspeito) || suspeito == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "O ID Digitado й um ID Invбlido!");
new nome[MAX_PLAYER_NAME];
GetPlayerName(suspeito, nome, sizeof(nome));
format(string, sizeof(string), "*ATENЗГO: O Suspeito %s(%d) estб foragido, cerquem a favela e prendгo-no!",nome,playerid);
SendClientMessageToAll(0xFF80808B,string);
level[playerid] = GetPlayerWantedLevel(playerid)+1;
return 1;