SA-MP Forums Archive
plz need help with /god with sscanf+zcmd - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: plz need help with /god with sscanf+zcmd (/showthread.php?tid=410160)



plz need help with /god with sscanf+zcmd - mittukuttan - 24.01.2013

with sscanf+zcmd plz.


Re: plz need help with /god with sscanf+zcmd - mittukuttan - 24.01.2013

i need infinite health


Re: plz need help with /god with sscanf+zcmd - [HK]Ryder[AN] - 24.01.2013

pawn Код:
CMD:god(playerid, params[])
{
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "USAGE : /god [playerid/part of name]");
if(id == INVALID_PLAYER_ID)) return SendClientMessage(playerid, -1, "wrong id");
SetPlayerHealth(id, 1000000);
SetPlayerArmour(id, 1000000);
return 1;
}



Re: plz need help with /god with sscanf+zcmd - mittukuttan - 24.01.2013

C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(106 : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(106 : warning 215: expression has no effect
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(106 : error 001: expected token: ";", but found "return"
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(1069) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


Re: plz need help with /god with sscanf+zcmd - DaRk_RaiN - 24.01.2013

If you don't know what that code means, put it at the bottom of your script.


Re: plz need help with /god with sscanf+zcmd - mittukuttan - 24.01.2013

what did u mean can u just fix it and re post it plz


Re: plz need help with /god with sscanf+zcmd - [HK]Ryder[AN] - 24.01.2013

pawn Код:
CMD:god(playerid, params[])
{
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "USAGE : /god [playerid/part of name]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "wrong id");
SetPlayerHealth(id, 1000000);
SetPlayerArmour(id, 1000000);
return 1;
}
if more errors come, please show the code in the lines along with the errors.


Re: plz need help with /god with sscanf+zcmd - LarzI - 24.01.2013

You should use "r" if it's meant for only players - not "u".

Also if you're going to ask for code, ask in the Script Request thread. This section is meant for helping you fix your command, not freely give you one.