11.05.2018, 01:30
I have made a command /storewep to store it in your trousers/jacket
And the command is not working i mean when i type /takewep [trouser]
its still showing the params of the command
When you type it
Usage: /takewep [trouser/pocket]
And the command is not working i mean when i type /takewep [trouser]
its still showing the params of the command
When you type it
Usage: /takewep [trouser/pocket]
pawn Код:
CMD:takewep(playerid, params[]) // Made by CMD
{
new option[32], string[128], string2[128];
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "You need to login first!");
if(sscanf(params, "i", option))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ptakegun [trousers/pocket]");
}
else if(!strcmp(option, "trousers", true))
{
if(!GunInfo[playerid][gGun][0]) return SendClientMessage(playerid, -1, "[Error] You don't have a weapon in your trousers pocket.");
GivePlayerWeapon(playerid, GunInfo[playerid][gGun][0], GunInfo[playerid][gGunAmmo][0]);
GunInfo[playerid][gGun][0] = 0;
GunInfo[playerid][gGunAmmo][0] = 0;
pInfo[playerid][pTrousers] = 0;
GUN(GetPlayerWeapon(playerid)));
}
else if(!strcmp(option, "pocket", true))
{
if(!GunInfo[playerid][gGun][1]) return SendClientMessage(playerid, -1, "[Error] You don't have a weapon in your jacket pocket.");
GivePlayerWeapon(playerid, GunInfo[playerid][gGun][1], GunInfo[playerid][gGunAmmo][1]);
GunInfo[playerid][gGun][1] = 0;
GunInfo[playerid][gGunAmmo][1] = 0;
pInfo[playerid][pJacket] = 0;
GUN(GetPlayerWeapon(playerid)));
}
return 1;
}