11.02.2015, 15:26
Hello guys, today I faced a problem with the Race System where I installed in my server
I have this
So when a player will be in a race he/she will not be able to use these commands also I want to block some commands when the player is in race
I have already a fuction
+REP to everyone who will help me
I have this
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SUBMISSION) {
if (IsPlayerInAnyVehicle(playerid)){
{
new currentveh;
new Float:angle;
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
currentveh = GetPlayerVehicleID(playerid);
GetVehicleZAngle(currentveh, angle);
SetVehicleZAngle(currentveh, angle);
SendClientMessage(playerid, -1, ""green"[NGC] "red"Vehicle Flipped and Repaired");
}
}
}
if(newkeys & KEY_FIRE) {
if (IsPlayerInAnyVehicle(playerid)){
{
new Float:vx, Float:vy, Float:vz;
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
SetVehicleVelocity(GetPlayerVehicleID(playerid) ,vx * 1.5,vy * 1.5 ,vz * 1.5);
}
}
}
if(newkeys & KEY_CROUCH) {
if (IsPlayerInAnyVehicle(playerid)){
{
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.3);
}
}
}
return 1;
}
I have already a fuction
pawn Код:
IsPlayerInRace(playerid)