08.05.2011, 16:12
pawn Код:
if (strcmp("/takem4", cmdtext, true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,2790.4155,-2486.0696,13.6471))
{
GivePlayerWeapon(playerid,31,400); // 31 is weapons (m4) ID and 200 is ammount of bullets
new playername[24];
new str[128]; // String
GetPlayerName(playerid, playername, sizeof(playername)); // Gets the player name for this action.
format(str, sizeof(str), "%s has opened a box and takes out m4 with some ammo", playername); // What it's going to look like.
SendClientMessageToAll(COLOR_RED, str); // Color to send the message to everyone in.
}
else SendClientMessage(playerid, COLOR_RED, "You have to be in Army Base Garage Three to take m4");
return 1;
}