[Ajuda] Equipa - 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] Equipa (
/showthread.php?tid=287933)
[Ajuda] Equipa -
Felipe_capone - 05.10.2011
Ola Tenho um Comando Pra equipa os player /eequipar sу que quando eu equipo equipa o cara normal sу que eu keria que quando equipasse ApAREcesse a mensagem : O Admin Tal Te equipo com vida , colete e Armas . Oq fasso ?
Segue abaixo o codigo :
PHP код:
if(strcmp(cmd, "/eequipar", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /eequipar [playerid/Parte-do-Nick]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GivePlayerWeapon(playerid, 24, 1000);
GivePlayerWeapon(playerid, 31, 1000);
GivePlayerWeapon(playerid, 29, 1000);
SetPlayerArmour(playerid, 90);
SetPlayerHealth(playerid, 100);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Autorizaзгo insuficiente !");
}
}
Re: [Duvida] Equipa -
ViniBorn - 05.10.2011
pawn Код:
if(strcmp(cmd, "/eequipar", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, COLOR_GRAD2, "USO: /eequipar [playerid/Parte-do-Nick]");
new playa;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string,128,"O admin %s te equipou",pname);
SendClientMessage(-1,playa,string);
GivePlayerWeapon(playa, 24, 1000);
GivePlayerWeapon(playa, 31, 1000);
GivePlayerWeapon(playa, 29, 1000);
SetPlayerArmour(playa, 90);
SetPlayerHealth(playa, 100);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Autorizaзгo insuficiente !");
}
}
Re: [Duvida] Equipa -
WLSF - 05.10.2011
pawn Код:
if(strcmp(cmd, "/eequipar", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, COLOR_GRAD2, "USO: /eequipar [playerid/Parte-do-Nick]");
new playa;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string,128,"O admin %s te equipou",pname);
SendClientMessage(playa,-1,string);
GivePlayerWeapon(playa, 24, 1000);
GivePlayerWeapon(playa, 31, 1000);
GivePlayerWeapon(playa, 29, 1000);
SetPlayerArmour(playa, 90);
SetPlayerHealth(playa, 100);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Autorizaзгo insuficiente !");
}
}
Se for pra ele equipar outra pessoa, o certo seria assim...
Re: [Duvida] Equipa -
Felipe_capone - 05.10.2011
Vlw
Re: [Duvida] Equipa -
WLSF - 05.10.2011
dб um rep pro viniborn
Re: [Duvida] Equipa -
ViniBorn - 05.10.2011
Nem tinha notado isso.
Re: [Duvida] Equipa -
Felipe_capone - 05.10.2011
dei vlw.