Allow/Disallow?
#9

@<Weponz>

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;
}
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;
Reply


Messages In This Thread
Allow/Disallow? - by <Weponz> - 26.10.2010, 18:48
Re: Allow/Disallow? - by BMUK - 26.10.2010, 18:51
Re: Allow/Disallow? - by per~fectionist - 26.10.2010, 18:55
Re: Allow/Disallow? - by <Weponz> - 26.10.2010, 18:55
Re: Allow/Disallow? - by <Weponz> - 26.10.2010, 19:00
Re: Allow/Disallow? - by per~fectionist - 26.10.2010, 19:00
Re: Allow/Disallow? - by per~fectionist - 26.10.2010, 19:02
Re: Allow/Disallow? - by <Weponz> - 26.10.2010, 19:04
Re: Allow/Disallow? - by SampStunta - 26.10.2010, 19:05
Re: Allow/Disallow? - by <Weponz> - 26.10.2010, 19:17

Forum Jump:


Users browsing this thread: 3 Guest(s)