[Ajuda] CallRemoteFunction
#1

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?
Reply
#2

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

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

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;

Reply
#4

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 
Reply
#5

Obrigado, rep pra todos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)