12.11.2014, 10:01
(
Последний раз редактировалось csganja; 12.11.2014 в 10:35.
)
So i have 2 functions that should run on game mode init:
But AtmsInit won't run if jobsinit is called first, and jobsinit won't run if atmsinit is called first.
The 2 functions are looking smth like this
same for
Any idea? Ask if you need more code...
Код:
public OnGameModeInit() { [... other code ...] JobsInit(); AtmsInit(); }
The 2 functions are looking smth like this
Код:
JobsInit(){ for (new i=0; i<=sizeof(Job); i++) { Job[i][jPickup] = CreatePickup(1318, 1, Job[i][jx], Job[i][jy], Job[i][jz]-2, -1); //z-2 format(str, sizeof(str), "%s\n%s\n%i$ (+0-%i$) per checkpoint", Job[i][jName], Job[i][jDescription], Job[i][jMoney], Job[i][jRandMoney]); Create3DTextLabel(str, ORANGE, Job[i][jx], Job[i][jy], Job[i][jz]-1, 40.0, 0, 0); //z-1 } }
Код:
AtmsInit(){ for (new i=0; i<=sizeof(Atm); i++) { CreateObject(2942 , Atm[i][ax], Atm[i][ay], Atm[i][az], Atm[i][arx], Atm[i][ary], Atm[i][arz]); // Train station atm Atm[i][aPickup] = CreatePickup(1318, 1, Atm[i][ax], Atm[i][ay], Atm[i][az]-1.2, -1); //z-2 format(str, sizeof(str), "%s\n%s", Atm[i][aName], Atm[i][aDescription]); Create3DTextLabel(str, GREEN, Atm[i][ax], Atm[i][ay], Atm[i][az]+1.5, 40.0, 0, 0); //z-1 } }