DynamicCP "Plz Help"
#1

How can i make this /repair command works with more than one DynamicCP ??

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/repair", cmdtext, true, 10) == 0)
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "{FF0004}[Error:] {FAF8F5}You are not in a vehicle!");
        if(!IsPlayerInDynamicCP(playerid,296)) return SendClientMessage(playerid,COLOR_WHITE,"{09FF00}[Usage:] {FAF8F5}Go To Any {FFFF00}Fuel Station {FAF8F5}To Repair Your Vehicle.");
        RepairVehicle(GetPlayerVehicleID(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Your vehicle has been successfully repaired!");
        PlayerPlaySound(playerid,5201,0.0,0.0,0.0);
        return 1;
    }
    return 0;
}
this is for DynamicCP [ID 296], how to make it works with ID 296 & 297 & 298 ??
it fails everytime i edit it, i tried to change it to if(!IsPlayerInDynamicCP(playerid,>=296)) but it failed.
Reply
#2

pawn Код:
if(!IsPlayerInDynamicCP(playerid,296) && !IsPlayerInDynamicCP(playerid, anotherID))
Reply
#3

thank you, but what if i have 100 ID's, is there a simple method to script it ??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)