#include a_samp
#include sscanf2
#include zcmd
CMD:setscore(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new id;
new pont;
if(sscanf(params, \"ud\", id, pont))
{
SetPlayerScore(id, pont);
} else { SendClientMessage(playerid, 0x0ffff, \"Használat: /setscore id pont\");return 1; }
}else { SendClientMessage(playerid, 0x0ffff, \"Nem vagy admin\");return 1; }
return 1;
}
#include a_samp
#include sscanf2
#include zcmd
CMD:setscore(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new id;
new pont;
if(sscanf(params,\"ud\",id, pont)) return SendClientMessage(playerid,0x0ffff,\"Használat: /setscore id pont\");
SetPlayerScore(id, pont);
}else { SendClientMessage(playerid, 0x0ffff, \"Nem vagy admin\");return 1; }
return 1;
}
Tesztelve.
thx megy zárok
Dupla hozzászólás automatikusan összefûzve. ( 2011. november 30. - 17:38:23 )
#include a_samp
#include sscanf2
#include zcmd
CMD:setscore(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new id;
new pont;
if(sscanf(params, \"ud\", id, pont))
{
SetPlayerScore(id, pont);
} else { SendClientMessage(playerid, 0x0ffff, \"Használat: /setscore id pont\");return 1; }
}else { SendClientMessage(playerid, 0x0ffff, \"Nem vagy admin\");return 1; }
return 1;
}
valamiért nem menti le mikor kilépek és megint viszajövök akkor 0 pont