[AJUDA] /Grampear - 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] /Grampear (
/showthread.php?tid=343855)
[AJUDA] /Grampear -
leosivi - 19.05.2012
Bom esse Cmd
/grampear sу funfa no id
0
Ex:
/grampear 5
ai ele funfa mas no ID
0
CMD:
/Grampear
pawn Код:
if(strcmp(cmd, "/grampear", true) == 0 || strcmp(cmd, "/rastrear", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /grampear [ID/Nome]");
return true;
}
if(strcmp(tmp,"off",true)==0)
{
PlayerInfo[playerid][pGrampo] = INVALID_PLAYER_ID;
SendClientMessage(playerid, COLOR_GRAD1, "Vocк desligou a escuta");
return true;
}
if(gTeam[playerid] == 2 || IsACop(playerid))
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
PlayerInfo[playerid][pGrampo] = giveplayerid;
format(string, sizeof(string), "Vocк grampeou o Tefelone de %s.", PlayerName(giveplayerid));
SendClientMessage(playerid, COLOR_GRAD1, "Para desligar a escuta use: /grampear off");
SendClientMessage(playerid, COLOR_GREY, string);
return true;
}
}
}
else
{
format(string, sizeof(string), " %d nao e um jogador ativo.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return true;
}
Agradeзo a Ajuda !
Grato...
Re: [AJUDA] /Grampear -
GReeN_WOoD - 19.05.2012
Lйo acho que isto te servirб:
PHP код:
http://wiki.sa-mp.com/
Se aceitar a dica: Nгo fique fazendo tуpicos pedindo ajuda toda hora, procure saber, entender para que vocк nгo dependa de ninguйm.
Re: [AJUDA] /Grampear -
zSuYaNw - 19.05.2012
pawn Код:
if(strcmp(cmd, "/grampear", true) == 0 || strcmp(cmd, "/rastrear", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /grampear [ID/Nome]");
return true;
}
if(strcmp(tmp,"off",true)==0)
{
PlayerInfo[playerid][pGrampo] = INVALID_PLAYER_ID;
SendClientMessage(playerid, COLOR_GRAD1, "Vocк desligou a escuta");
return true;
}
giveplayerid = strval(tmp);
if(gTeam[playerid] == 2 || IsACop(playerid))
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
PlayerInfo[playerid][pGrampo] = giveplayerid;
format(string, sizeof(string), "Vocк grampeou o Tefelone de %s.", PlayerName(giveplayerid));
SendClientMessage(playerid, COLOR_GRAD1, "Para desligar a escuta use: /grampear off");
SendClientMessage(playerid, COLOR_GREY, string);
return true;
}
}
}
else
{
format(string, sizeof(string), " %d nao e um jogador ativo.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return true;
}
Re: [AJUDA] /Grampear -
leosivi - 19.05.2012
Vlw Garfield
Funfo certinho !
REpp bug qnd volta te dou
pq axo q meu ultimo foi pra vx
Re: [AJUDA] /Grampear -
CidadeNovaRP - 19.05.2012
Aprende a usar ZCMD+SSCANF pff ...