Whats wrong with this /exit CMD? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Whats wrong with this /exit CMD? (
/showthread.php?tid=152090)
Whats wrong with this /exit CMD? -
hardstop - 02.06.2010
Код:
if(strcmp(cmdtext, "/exit", true, 3) == 0)
if(VehicleID == Myygiauto1)
if(VehicleID == Myygiauto2)
if(VehicleID == Myygiauto3)
{
RemovePlayerFromVehicle(playerid);
return 1;
}
It doesnt work, whats wrong
and yes i am in the car "Myygiauto1"
Re: Whats wrong with this /exit CMD? -
MadeMan - 02.06.2010
pawn Код:
if(strcmp(cmdtext, "/exit", true) == 0)
{
switch(VehicleID)
{
case Myygiauto1, Myygiauto2, Myygiauto3:
{
RemovePlayerFromVehicle(playerid);
return 1;
}
}
}
Re: Whats wrong with this /exit CMD? -
Sergei - 02.06.2010
Switch can only be used for constant values (how obvious), so you will need to use if.
Re: Whats wrong with this /exit CMD? -
MadeMan - 02.06.2010
Quote:
Originally Posted by $ЂЯĢ
Switch can only be used for constant values (how obvious), so you will need to use if.
|
Don't say if you don't know.
EDIT: and lol, why would I need to check constant values ?