12.07.2018, 08:57
yes, it works but now im having 1 error and 1 warning with this:
line error
PHP код:
CMD:setmoney ( playerid , params [] )
{
if ( !PlayerInfo[playerid][pAdmin] >= 4 ) return NotAdmin(playerid);
new id , ammount;
if ( !IsPlayerConnected ( id ) ) return SendClientMessage ( playerid , COLOR_CORRECTION , "Invalid player specified !" ) ;
if ( ammount < 0 || ammount > 900000000 ) return SendClientMessage ( playerid , -1 , "You can't set more than $900.000.000" ) ;
if ( GetPlayerMoney ( playerid ) < ammount ) return SendClientMessage ( playerid , -1 , "You cant give money more than you have." ) ;
if ( sscanf ( params , "ui" , id , ammount ) ) return SendClientMessage ( playerid , -1 , "USAGE : /setmoney [PlayerID / PartOfName] [Ammount]" ) ;
else
{
new IName [ MAX_PLAYER_NAME ] , PName [ MAX_PLAYER_NAME ] , Str [ 128 ] ;
GetPlayerName ( id , IName , MAX_PLAYER_NAME ) ;
GetPlayerName ( playerid , IName , MAX_PLAYER_NAME ) ;
format ( Str , 128 , "%s Has Given You %d" , IName , ammount ) ;
SendClientMessage ( id , COLOR_RED , Str ) ;
format ( Str , 128 , "You Gave %d Money To %s" , ammount , PName ) ;
SendClientMessage ( playerid , COLOR_GREEN , Str ) ;
GivePlayerMoney ( id , ammount ) ;
}
return 1;
}
Код HTML:
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(1788) : warning 213: tag mismatch C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(1788) : error 017: undefined symbol "NotAdmin" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Код HTML:
if ( !PlayerInfo[playerid][pAdmin] >= 4 ) return NotAdmin(playerid);


