09.06.2012, 06:27
Alright i ran into an a problem
How could I get this to work with CMDetplate for admin level 4
How could I get this to work with CMDetplate for admin level 4
Код:
if(PlayerInfo[playerid][pAdmin] >= 4) {
Код:
CMD:setplate( playerid, params[] ) { new iVictim, szPlate[32]; if( sscanf( params, "us[32]", iVictim, szPlate ) ) return SendClientMessage( playerid, -1, "Syntax: /plate [playerid][plate(1-32 letters)]" ); if( strlen( szPlate ) > 32 ) return SendClientMessage( playerid, -1, "Syntax: /plate [playerid][plate(1-32 letters)]" ); if( !IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid, -1, "Error: You're not an administrator." ); if( !IsPlayerConnected( iVictim ) ) return SendClientMessage( playerid, -1, "Error: That player isn't connected." ); if( !IsPlayerInAnyVehicle( iVictim ) ) return SendClientMessage( playerid, -1, "Error: That player isn't in a vehicle." ); new szString[128], pVeh, Float:vPos[4]; pVeh = GetPlayerVehicleID( iVictim ); format( v_Plate[pVeh], 32, "%s", szPlate ); SetVehicleNumberPlate( pVeh, szPlate ); GetPlayerPos( iVictim, vPos[0], vPos[1], vPos[2] ); GetVehicleZAngle( pVeh, vPos[3] ); SetVehicleToRespawn( pVeh ); SetVehiclePos( pVeh, vPos[0], vPos[1], vPos[2] ); SetVehicleZAngle( pVeh, vPos[3] ); PutPlayerInVehicle( iVictim, pVeh, 0 ); format( szString, 128, "An administrator set your vehicle plate to %s.", szPlate ); SendClientMessage( playerid, -1, szString ); return 1; }