SA-MP Forums Archive
[Ajuda] CallRemoteFunction - 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] CallRemoteFunction (/showthread.php?tid=601591)



CallRemoteFunction - Delete_ - 23.02.2016

Uso
PHP Code:
CallRemoteFunction("PegarLevel","i",playerid) < 2
Pra verificar se o level do player й 2 mais como faзo pra setar o level do player pra 2 usando CallRemote?


Re: CallRemoteFunction - klap - 23.02.2016

CallRemoteFunction("SetLevel","ii",playerid, NOVOLVL)

й isso que quer? Nгo entendi bem '-'


Re: CallRemoteFunction - F1N4L - 23.02.2016

basicamente o q o amigo acima fez

PHP Code:

CMD
:setlevel(playeridparams[])
{
     new 
targetlevel;
     if (
sscanf(params"ui"targetlevel)) return SendClientMessage(playerid, -1"/setlevel [id] [level]");
     
CallRemoteFunction("SetLevel","ui"targetlevel// "SetLevel" й a variavel q vc define o level
return 1;




Re: CallRemoteFunction - Artista - 23.02.2016

Do mesmo modo:

PHP Code:
// No FS
new Var_level[MAX_PLAYERS];
forward SetLevel(playeridlevel);
public 
SetLevel(playeridlevel)
{
    
Var_level[playerid] = level;
    return 
1;
}
// No GM
CallRemoteFunction("SetLevel""dd"playerid5); // Irб setar o level para 5 



Re: CallRemoteFunction - Delete_ - 23.02.2016

Obrigado, rep pra todos.