public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/vr", true) == 1) {
if(IsPlayerVipMember(playerid)) return SendClientMessage(playerid,red,"Only Vip's Can Repair Their Vehicles.");
{
if(IsPlayerInAnyVehicle(playerid)) {
new vehicleid = GetPlayerVehicleID(playerid);
SetVehicleHealth(vehicleid,1000.0);
SendClientMessage(playerid,Green1, "Vehicle fixed.");
}
else {
SendClientMessage(playerid,red, "You are not in a vehicle!");
}
}
}
return 1;
}
if(strcmp(cmdtext, "/vr", true) == 1)
if(strcmp(cmdtext, "/vr", true) == 0)
pawn Код:
but when i do /vr ingame it doesent do anything... it DOES NOT tell me: You are not in a vehicle!, Vehicle fixed., or Only Vip's Can Repair Their Vehicles. its like i type it but the server does not respond USING LUXADMIN FOR IsPlayerVipMember |
if(strcmp(cmdtext, "/vr", true) == 0) { if(IsPlayerVipMember(playerid)) return SendClientMessage(playerid,red,"Only Vip's Can Repair Their Vehicles."); { if(IsPlayerInAnyVehicle(playerid)) { new vehicleid = GetPlayerVehicleID(playerid); SetVehicleHealth(vehicleid,1000.0); SendClientMessage(playerid,Green1, "Vehicle fixed."); } else { SendClientMessage(playerid,red, "You are not in a vehicle!"); } } } return 1; }
if(strcmp(cmdtext, "/vr", true) == 0) { if(!IsPlayerVipMember(playerid)) return SendClientMessage(playerid,red,"Only Vip's Can Repair Their Vehicles."); else { if(IsPlayerInAnyVehicle(playerid)) { new vehicleid = GetPlayerVehicleID(playerid); SetVehicleHealth(vehicleid,1000.0); SendClientMessage(playerid,Green1, "Vehicle fixed."); } else { SendClientMessage(playerid,red, "You are not in a vehicle!"); } } } return 1; }
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/vr", true))
{
if(IsPlayerVipMember(playerid)) return SendClientMessage(playerid,red,"Only Vip's Can Repair Their Vehicles.");
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
SetVehicleHealth(vehicleid,1000.0);
SendClientMessage(playerid,Green1, "Vehicle fixed.");
}
else
{
SendClientMessage(playerid,red, "You are not in a vehicle!");
}
}
return 1;
}
^That wont work. Mine is corrected:
Код:
if(strcmp(cmdtext, "/vr", true) == 0) { if(!IsPlayerVipMember(playerid)) return SendClientMessage(playerid,red,"Only Vip's Can Repair Their Vehicles."); else { if(IsPlayerInAnyVehicle(playerid)) { new vehicleid = GetPlayerVehicleID(playerid); SetVehicleHealth(vehicleid,1000.0); SendClientMessage(playerid,Green1, "Vehicle fixed."); } else { SendClientMessage(playerid,red, "You are not in a vehicle!"); } } } return 1; } |
if(strcmp(cmdtext, "/vr", true) == 0) { if(!IsPlayerVipMember(playerid)) return SendClientMessage(playerid,red,"Only Vip's Can Repair Their Vehicles."); else { if(IsPlayerInAnyVehicle(playerid)) { new vehicleid = GetPlayerVehicleID(playerid); SetVehicleHealth(vehicleid,1000.0); SendClientMessage(playerid,Green1, "Vehicle fixed."); } else { SendClientMessage(playerid,red, "You are not in a vehicle!"); } } } return 1; }
if (IsPlayerLuxAdm(playerid))