public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new speed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0);
if(speed > 270 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 519 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 553 || speed > 300)
{
if(!IsPlayerAdmin(playerid) || pInfo[playerid][Admin] < 4)// if im not wrong this is saying if the player is not rcon or lower than level 4
{
new string[128];
format(string, sizeof(string), "Player %s(ID:%i) might be using speed hacks (%d MPH)", GetName(playerid),playerid, speed);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
RemovePlayerFromVehicle(playerid);
SetPlayerPos(playerid, X, Y, Z+5);
SendToAdmins(orange, string);
}
}
}
if (a == true && b == true) { // This only gets excuted if BOTH a AND (&& = and) b are true } if (a == true || b == true) { // This gets executed when either: // a == true (b can be true or false) OR (|| = or) // b == true (a can be true or false) }
Код:
if (a == true && b == true) { // This only gets excuted if BOTH a AND (&& = and) b are true } if (a == true || b == true) { // This gets executed when either: // a == true (b can be true or false) OR (|| = or) // b == true (a can be true or false) } |
if(!IsPlayerAdmin(playerid) || pInfo[playerid][Admin] < 4)
I know that , but bro i think my coding is right cause this is saying if the player isn't rcon or the player level is below 4 then it should send the message to the admins.
PHP код:
|