PickUp Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: PickUp Help (
/showthread.php?tid=293716)
PickUp Help -
lordturhan - 29.10.2011
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))
Re: PickUp Help -
Stigg - 29.10.2011
Edit: misread sorry.
Re: PickUp Help -
IstuntmanI - 29.10.2011
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;
}
Re: PickUp Help -
lordturhan - 29.10.2011
Thanks Man Rep Added