10.04.2012, 08:34
(
Последний раз редактировалось RenSoprano; 10.04.2012 в 09:46.
Причина: Added CMD:givegun
)
Hello I have problem with IDs in game when I try to teleport ID 3 it teleport ID 0
And I have problem with Givegun command when
I try to give gun its only show text but no give weapon
This is Command GiveGun
And I have problem with Givegun command when
I try to give gun its only show text but no give weapon
This is Command GiveGun
pawn Код:
CMD:givegun(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
new target, gun, string[128];
if(sscanf(params, "ud", target, gun))
{
SendClientMessage(playerid, COLOR_GREY, "Usage: /givegun <playerid> <gun>");
return 1;
}
if(gun < 1 || gun > 47) { SendClientMessage(playerid, COLOR_GREY, "Don't go below 1 or above 47."); return 1; }
if(IsPlayerConnected(target))
{
if(target != INVALID_PLAYER_ID && gun <= 20 || gun >= 22)
{
GivePlayerValidWeapon(target, gun, 50000);
format(string, sizeof(string), "Admin %s has given you a weapon.", GetName(playerid));
SendClientMessage(target, COLOR_GREY, string);
format(string, sizeof(string), "You have given %s a weapon.", GetName(target));
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
return 1;
}
return 1;
}