16.07.2014, 21:26
Well, I tried to make it, as I have a few errors.
Finally I know how to work with sscanf now.
Finally I know how to work with sscanf now.
Quote:
C:\Users\selma\Desktop\Samp\gamemodes\Lerenscripte n.pwn(576) : error 003: declaration of a local variable must appear in a compound block C:\Users\selma\Desktop\Samp\gamemodes\Lerenscripte n.pwn(576) : error 017: undefined symbol "target" C:\Users\selma\Desktop\Samp\gamemodes\Lerenscripte n.pwn(576) : warning 215: expression has no effect C:\Users\selma\Desktop\Samp\gamemodes\Lerenscripte n.pwn(577) : error 017: undefined symbol "target" C:\Users\selma\Desktop\Samp\gamemodes\Lerenscripte n.pwn(579) : error 017: undefined symbol "target" C:\Users\selma\Desktop\Samp\gamemodes\Lerenscripte n.pwn(581) : error 017: undefined symbol "target" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors. |
PHP код:
CMD:resetweapon(playerid, params[])
{
if (!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, -1, "SERVER: Unknown command.");
}
else if (IsPlayerAdmin(playerid))
new target;
if(sscanf(params, "i", target))
SendClientMessage(playerid, COLOR_WARN, "USAGE: /resetweapon [playerid]");
ResetPlayerWeapons(target);
SendClientMessage(playerid, COLOR_WARN, "You removed the player's weapon.");
SendClientMessage(target, COLOR_RED, "You have been disarmed!");
return 1;
}