PickUp Help
#1

pawn Код:
{
    if(pickupid == Soldier) // Check that the pickup ID of the pickup they picked up is mypickup
    if(GetPlayerTeam(playerid) == 2) return SendClientMessage(playerid,LIGHTBLUE,"[Server]:This Weapons Is Only For Army");
    {
BLA BLA BLA BLA
    }
    // if you need to add more pickups, simply do this:
    else if (pickupid == (Soldier2))
    if(GetPlayerTeam(playerid) == 2) return SendClientMessage(playerid,GREEN,"[Server]:This Weapons Is Only For Army");
    {
    STUFF IN HERE Problem isnt about them
    }
    return 1;
}
https://sampwiki.blast.hk/wiki/PickupGuide

I did all thinks correct like new etc but it gives this error

Код:
(221) : error 029: invalid expression, assumed zero
(221) : warning 215: expression has no effect
(221) : error 001: expected token: ";", but found "if"
EDİT:Btw 211 line is else if (pickupid == (Soldier2))
Reply
#2

Edit: misread sorry.
Reply
#3

Try this, will work:
Код:
{
	if(pickupid == Soldier) // Check that the pickup ID of the pickup they picked up is mypickup
	{
		if(GetPlayerTeam(playerid) == 2) return SendClientMessage(playerid,LIGHTBLUE,"[Server]:This Weapons Is Only For Army");

		BLA BLA BLA BLA
	}
	// if you need to add more pickups, simply do this:
	else if (pickupid == Soldier2)
	{
		if(GetPlayerTeam(playerid) == 2) return SendClientMessage(playerid,GREEN,"[Server]:This Weapons Is Only For Army");

		STUFF IN HERE Problem isnt about them
	}
	return 1;
}
Reply
#4

Thanks Man Rep Added
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)