DynamicCP "Plz Help" - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: DynamicCP "Plz Help" (
/showthread.php?tid=463556)
DynamicCP "Plz Help" -
AnonScripter - 12.09.2013
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.
AW: DynamicCP "Plz Help" -
Skimmer - 12.09.2013
pawn Код:
if(!IsPlayerInDynamicCP(playerid,296) && !IsPlayerInDynamicCP(playerid, anotherID))
Re: DynamicCP "Plz Help" -
AnonScripter - 12.09.2013
thank you, but what if i have 100 ID's, is there a simple method to script it ??