25.01.2011, 12:49
(
Последний раз редактировалось Reezmi; 25.01.2011 в 14:50.
)
hi. i haz a question.
how i can make spawn choosing like grandlarency?
i tried from grandlarency code:
and here is my edited code:
but it worked shitty so response please if you know how to fix this.
and i need to work it smth like OnPlayerRequestClass.
how i can make spawn choosing like grandlarency?
i tried from grandlarency code:
pawn Код:
ClassSel_SwitchToNextCity(playerid)
{
gPlayerCitySelection[playerid]++;
if(gPlayerCitySelection[playerid] > CITY_LAS_VENTURAS) {
gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
}
PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
gPlayerLastCitySelectionTick[playerid] = GetTickCount();
ClassSel_SetupSelectedCity(playerid);
}
//----------------------------------------------------------
ClassSel_SwitchToPreviousCity(playerid)
{
gPlayerCitySelection[playerid]--;
if(gPlayerCitySelection[playerid] < CITY_LOS_SANTOS) {
gPlayerCitySelection[playerid] = CITY_LAS_VENTURAS;
}
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
gPlayerLastCitySelectionTick[playerid] = GetTickCount();
ClassSel_SetupSelectedCity(playerid);
}
pawn Код:
ClassSel_SwitchToNextSpawn(playerid)
{
gPlayerSpawnSelection[playerid]++;
if(gPlayerSpawnSelection[playerid] > SPAWN_FARMER) {
gPlayerSpawnSelection[playerid] = SPAWN_SECURITY;
}
if(gPlayerSpawnSelection[playerid] > SPAWN_MEDIC) {
gPlayerSpawnSelection[playerid] = SPAWN_FARMER;
}
else if(gPlayerSpawnSelection[playerid] > SPAWN_GUN_DEALER) {
gPlayerSpawnSelection[playerid] = SPAWN_MEDIC;
}
else if(gPlayerSpawnSelection[playerid] > SPAWN_POLICE) {
gPlayerSpawnSelection[playerid] = SPAWN_GUN_DEALER;
}
else if(gPlayerSpawnSelection[playerid] > SPAWN_RACER) {
gPlayerSpawnSelection[playerid] = SPAWN_POLICE;
}
PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
gPlayerLastSpawnSelectionTick[playerid] = GetTickCount();
ClassSel_SetupSelectedSpawn(playerid);
}
ClassSel_SwitchToPreviousSpawn(playerid)
{
gPlayerSpawnSelection[playerid]--;
if(gPlayerSpawnSelection[playerid] < SPAWN_SECURITY) {
gPlayerSpawnSelection[playerid] = SPAWN_FARMER;
}
else if(gPlayerSpawnSelection[playerid] < SPAWN_FARMER) {
gPlayerSpawnSelection[playerid] = SPAWN_MEDIC;
}
else if(gPlayerSpawnSelection[playerid] < SPAWN_MEDIC) {
gPlayerSpawnSelection[playerid] = SPAWN_GUN_DEALER;
}
else if(gPlayerSpawnSelection[playerid] < SPAWN_GUN_DEALER) {
gPlayerSpawnSelection[playerid] = SPAWN_POLICE;
}
else if(gPlayerSpawnSelection[playerid] < SPAWN_POLICE) {
gPlayerSpawnSelection[playerid] = SPAWN_RACER;
}
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
gPlayerLastSpawnSelectionTick[playerid] = GetTickCount();
ClassSel_SetupSelectedSpawn(playerid);
}
and i need to work it smth like OnPlayerRequestClass.