public OnGameModeInit()
{
SetWeather(2);
SetGameModeText("RP Mode BETA");
DisableInteriorEnterExits();
EnableStuntBonusForAll(0);
SetTimer("SyncUp", 5000, 1);
othtimer = SetTimer("OtherTimer", 1000, 1);
SetTimer("MoneyTimer", 1000, 1);
for(new playerid = 0; playerid <= MAX_PLAYERS; playerid++) {
PlayerInfo[playerid][pFirstS] = 0; }
for(new i=0;i<MAX_VEHICLES;i++)
engineOn[i]=false;
for(new i = 0; i <= MAX_PLAYERS; i++)
AddPlayerClass(98,1217.4446,-1692.5115,19.7344,94.5243,0,0,0,0,0,0);
noooc = 1;
first = 0;
CreatePickup(1318, 23, 1554.9537,-1675.6584,16.1953);
CreatePickup(1318, 23, 1833.3688,-1842.7252,13.5781);
return 1;
}
public OnGameModeInit()
{
SetGameModeText("RP Mode BETA");
SetWeather(2);
DisableInteriorEnterExits();
EnableStuntBonusForAll(0);
SetTimer("SyncUp", 5000, 1);
othtimer = SetTimer("OtherTimer", 1000, 1);
SetTimer("MoneyTimer", 1000, 1);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerInfo[i][pFirstS] = 0;
}
for(new j = 0; j < MAX_VEHICLES; j++)
{
engineOn[j]=false;
}
AddPlayerClass(98,1217.4446,-1692.5115,19.7344,94.5243,0,0,0,0,0,0);
noooc = 1;
first = 0;
CreatePickup(1318, 23, 1554.9537,-1675.6584,16.1953, -1);
CreatePickup(1318, 23, 1833.3688,-1842.7252,13.5781, -1);
return 1;
}
new pickupOne = CreatePickup(1318, 23, 1554.9537,-1675.6584,16.1953, -1);
new pickupTwo = CreatePickup(1318, 23, 1833.3688,-1842.7252,13.5781, -1);
printf("pickupOne ID: %d, pickupTwo ID: %d", pickupOne, pickupTwo);
CreateDynamicPickup(...);
CreateDynamicObject(...);
|
The native functions for pickups are:
pawn Код:
pawn Код:
|
|
1) There are no objects created there.
2) CLEAN UP YOUR CODE. There is no need for two of the same loop. pawn Код:
4) for(new i = 0; i <= MAX_PLAYERS; i++) is WRONG! Remember, when we create a variable like gPlayerVariable[MAX_PLAYERS], we have access to gPlayerVariable[0] - gPlayerVariable[499] because MAX_PLAYERS is defined as 500. The proper loop is for(new i = 0; i < MAX_PLAYERS; i++). I would explain more but there is lots of information available on this subject. 5) As for the pickups. I'm assuming you knew what your doing when you got the co-ordinates. First of, pickups require a virtual world. https://sampwiki.blast.hk/wiki/CreatePickup If thats not the problem, try some debugging. Код:
new pickupOne = CreatePickup(1318, 23, 1554.9537,-1675.6584,16.1953, -1);
new pickupTwo = CreatePickup(1318, 23, 1833.3688,-1842.7252,13.5781, -1);
printf("pickupOne ID: %d, pickupTwo ID: %d", pickupOne, pickupTwo);
It should output something like pickupOne ID: 1, pickupTwo ID: 2 If debugging fails, try different types, models to make sure the ones you are using are valid. The streamer plugin does not concern this problem. None of the above code is tested as I'm writing it as i go along, good luck ![]() |