SA-MP Forums Archive
[Pedido] Pawno travando - 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: [Pedido] Pawno travando (/showthread.php?tid=643809)



Pawno travando - TheHave - 28.10.2017

galera
eu fui compilar mas tava dando erro na formataзao da string, erro que digo,й a mensagem nгo aparecer toda. entao eu colokei 9999999999 nos bagui la e travou tudo
ai coloquei o str nos aspas e aparece "str" invйs da mensagem
codigo:

CMDetar(playerid, params[])
{
new id, str[999999999999];
if(sscanf(params, "i", id)) return SendClientMessage(playerid, -1, "use /setar [id]");
format(str, sizeof(str), "O admi te setou de AR");
SendClientMessage(playerid, -1, "str");
AR = 1;
return true;
}


Re: Pawno travando - IlanZ - 28.10.2017

PHP код:
CMD:setar(playeridparams[])
{
    new 
id;
    if(
sscanf(params"i"id)) return SendClientMessage(playerid, -1"use /setar [id]");
    
SendClientMessage(playerid, -1"O admi te setou de AR");
    
AR 1;
    return 
true;




Re: Pawno travando - TheHave - 28.10.2017

agora ta mandano a mensagem pra me
eu quero que mande pra quem eu setei


Re: Pawno travando - C4rtm4n - 28.10.2017

Troque o str999999999999
Por
Str 128 e dps coloca return 1 e n retur true.


Re: Pawno travando - zCyan - 28.10.2017

Quote:

Str 128 e dps coloca return 1 e n retur true.

return true e return 1 й a mesma coisa.

@topic:

PHP код:
CMD:setar(playeridparams[]) 

    new 
id
    if(
sscanf(params"i"id)) return SendClientMessage(playerid, -1"use /setar [id]"); 
    if(!
IsPlayerConnected(id)) return SendClientMessage(playerid, -1"ID invalido");
    
SendClientMessage(id, -1"O admi te setou de AR"); 
    
AR 1
    return 
true




Re: Pawno travando - TheHave - 28.10.2017

mano n funcionou


Re: Pawno travando - C4rtm4n - 28.10.2017

PHP код:
new AR[MAX_PLAYERS]; // No topo do GM
CMD:setar(playeridparams[]) 

    new 
id
    if(
sscanf(params"us"id)) return SendClientMessage(playerid, -1"use /setar [id]"); 
    
SendClientMessage(id, -1"O admi te setou de AR"); 
    
AR[id] = 1
    return 
1;




Re: Pawno travando - IlanZ - 28.10.2017

Quote:
Originally Posted by TheHave
Посмотреть сообщение
agora ta mandano a mensagem pra me
eu quero que mande pra quem eu setei
PHP код:
CMD:setar(playeridparams[]) 

    new 
idnome[24], str[50]; 
    if(
sscanf(params"i"id)) return SendClientMessage(playerid, -1"use /setar [id]"); 
    
GetPlayerName(playeridnome24);
    
format(strsizeof(str), "Administrador %s te setou"nome); 
    
SendClientMessage(id, -1str);
    
AR 1
    return 
true




Re: Pawno travando - TheHave - 28.10.2017

do jeito que o cartman mandou foi


Re: Pawno travando - C4rtm4n - 28.10.2017

Quote:
Originally Posted by TheHave
Посмотреть сообщение
do jeito que o cartman mandou foi
Sim, eu imaginei, eu pensei que a sua variavel estava assim

PHP код:
new AR
Por isso estava dando erro pq n tinha matriz para setar o ID