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=372868)
Pickup Help[ -
cod5devious - 28.08.2012
When I make a pickup it doesn't appear here the code.
pawn Код:
public OnFilterScriptInit( ) {
for( new i = 0; i < MAX_VEHICLES; ++i )
vehhasminigun[ i ] = 0;
SetTimer( "check", 5000, 1 );
SetTimer( "loop", 500, 1 );
nos = CreatePickup(1009, 14, 1211.199, 3213.09, 42.2999, -1);
nos1 = CreatePickup(1009, 14, 1227.5, 3212.099, 42.2999, -1);
nos2 = CreatePickup(1009, 14, 1194.59, 3211.79, 42.2999, -1);
print("All pickups are created!");
Map();
print("Map has loaded");
return 1;
}
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == nos)
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
return 1;
}
else if(pickupid == nos1)
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
return 1;
}
else if(pickupid == nos2)
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
return 1;
}
return 1;
}
The pickup which the object is obove is objects from MTA mostly the object id.
3458