26.10.2010, 19:05
@<Weponz>
That's how it is suppost to be.
For example, all strcmp commands are like that.
That's how you would do it if you had no more commands in strcmp.
But if there is more then just use return 1;
That's how it is suppost to be.
For example, all strcmp commands are like that.
pawn Код:
if(strcmp("/extract", cmdtext, true, 5) == 0)
{
if(PlayerInfo[playerid][FuelAmount] < 1000){
//player has less then 1000 fuel
return 0;
}
else{
new Float:x, Float:y, Float:z, Float:az;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, az);
CreateVehicle(487, x+5, y+5, z, az, -1, -1, 180);
SendClientMessage(playerid, RED, "[ATT]: Extraction Has Arrived! (Cost: 1000 Fuel To Deliver)");
PlayerInfo[playerid][FuelAmount] = PlayerInfo[playerid][FuelAmount] -1000;
return 1;
}
}
return 0;
}
But if there is more then just use return 1;