09.12.2010, 20:27
Use ZCMD and sscanf.
If you're new to scripting Pawn in SA:MP you should start using scripts that can help a lot such as using MySQL, zcmd, foreach, sscanf and a few others.
pawn Код:
COMMAND:healplayer( playerid, params [ ] )
{
if ( IsPlayerAdmin ( playerid ) ) //Change to likings
{
new
tPlayer,
;
if ( sscanf ( params, "u", tPlayer ) ) return SendClientMessage ( playerid, 0xFFFFFFAA, "SYNTAX: `| /healplayer [ Target player or name ]`" );
else
{
SetPlayerHealth ( tPlayer, 100.0 );
}
}
return 1;
}
If you're new to scripting Pawn in SA:MP you should start using scripts that can help a lot such as using MySQL, zcmd, foreach, sscanf and a few others.