plz need help with /god with sscanf+zcmd
#1

with sscanf+zcmd plz.
Reply
#2

i need infinite health
Reply
#3

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;
}
Reply
#4

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

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

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

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.
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)