[Ajuda] Ajuda com esse sistema - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda com esse sistema (
/showthread.php?tid=495841)
Ajuda com esse sistema -
Wendel S. - 19.02.2014
O Sistema de abatidos й assim:
Код:
if(PlayerInfo[killerid][pBOPE] >= 1 || PlayerInfo[playerid][pGATE] >= 1)
{
if(PlayerInfo[playerid][pPresoLS] >= 1)
{
return 1;
}
new string[20];
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][pPM] >= 1 || PlayerInfo[killerid][pROTA] >= 1)
{
if(PlayerInfo[playerid][pPresoSF] >= 1)
{
return 1;
}
new string[20];
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;
}
Quero para que ele funcione assim!:
Код:
if(IsPlayerConnected(killerid))
{
PlayerInfo[killerid][pMatou]++;
PlayerInfo[playerid][pMorreu]++;
GetPlayerName(killerid,playername,20);
GivePlayerMoney(killerid, 100);
}
Pois Ele Estб assim:
Код:
if(IsPlayerConnected(killerid))
{
Matou[killerid] ++;
Morreu[playerid] ++;
GivePlayerMoney(killerid, 100);
}
Re: Ajuda com esse sistema -
Wanderson_SAMP - 19.02.2014
Cara sу mudar as variaveis de lб :/
pelo que eu entendi:
Код:
if(IsPlayerConnected(killerid))
{
PlayerInfo[killerid][Matou]++;
PlayerInfo[playerid][Morreu]++;
GetPlayerName(killerid,playername,20);
GivePlayerMoney(killerid, 100);
}
Re: Ajuda com esse sistema -
Wendel S. - 19.02.2014
Nгo o correto e modicar o script do abatido ali pois a variavel eu ja tentei.