PHP Code:
CMD:unpackageweapon(playerid, params[])
{
new player, packagetype, str[128];
if(sscanf(params, "su", packagetype, playerid)) return SendClientMessage(playerid, COLOR_GRAY, "/unpackage [playerid] [packagetype]");
{
if(IsInRangeOfPlayer(playerid, player, 5))
{
if(!strcmp(packagetype, "pistol", true))
{
if(Inventory[playerid][PistolPackage] > 0)
{
TakeInventoryItem(playerid, PISTOLPACKAGE, 1);
GivePlayerGun(player, 24, 100);
}
else SendErrorMessage(playerid, "You don't have this item.");
return 1;
}
else if(!strcmp(packagetype, "shotgun", true))
{
if(Inventory[playerid][ShotgunPackage] > 0)
{
TakeInventoryItem(playerid, SHOTGUNPACKAGE, 1);
GivePlayerGun(player, 25, 125);
}
else SendErrorMessage(playerid, "You don't have this item.");
}
else if(!strcmp(packagetype, "automatic", true))
{
if(Inventory[playerid][AutomaticRiflePackage] > 0)
{
TakeInventoryItem(playerid, AUTOMATICRIFLEPACKAGE, 1);
format(str, sizeof(str), "%s hands an M4 to %s. ", GetRoleplayName(playerid), GetRoleplayName(player));
SetPlayerChatBubble(playerid, str, COLOR_RP, Range_Short, 7000);
GivePlayerGun(player, 31, 250);
}
else if(!strcmp(packagetype, "molotov", true))
{
if(Inventory[playerid][ExplosivePackage] > 0)
{
TakeInventoryItem(playerid, EXPLOSIVEPACKAGE, 1);
format(str, sizeof(str), "%s hands a Molotov %s. ", GetRoleplayName(playerid), GetRoleplayName(player));
SetPlayerChatBubble(playerid, str, COLOR_RP, Range_Short, 7000);
GivePlayerGun(player, 18, 1);
}
else SendErrorMessage(playerid, "You don't have this item.");
return 1;
}
}
}
else SendErrorMessage(playerid, "You are too far away from this player.");
}
return 1;
}
PHP Code:
C:\Users\Austin\Desktop\Stuff\United Roleplay\gamemodes\U:RP-R39.pwn(17007) : error 035: argument type mismatch (argument 1)
C:\Users\Austin\Desktop\Stuff\United Roleplay\gamemodes\U:RP-R39.pwn(17018) : error 035: argument type mismatch (argument 1)
C:\Users\Austin\Desktop\Stuff\United Roleplay\gamemodes\U:RP-R39.pwn(17028) : error 035: argument type mismatch (argument 1)
C:\Users\Austin\Desktop\Stuff\United Roleplay\gamemodes\U:RP-R39.pwn(17037) : error 035: argument type mismatch (argument 1
PHP Code:
else if(!strcmp(packagetype, "pistol", true))