gabyskm96 Posted April 9, 2013 Posted April 9, 2013 Salut am un server gf si am o problema cand un jucator isi cumpara casa il spawneaza la civili sau daca e in factiune la factiune.. Cum pot sa ii spawneze in casele lor. comanda spawnchange nu exista :)
BuBu Posted April 9, 2013 Posted April 9, 2013 Daca folosesti modul GF trebuie sa ai ceva de genu daca nu adauga tu la setplayerspawn (functia care seteaza spawn-ul playerului) if(house !=255) { if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else { SetPlayerToTeamColor(playerid); SetPlayerInterior(playerid,HouseInfo[house][hInt]); SetPlayerVirtualWorld(playerid,HouseInfo[house][hWorld]); SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player PlayerInfo[playerid][pLocal] = house; HouseEntered[playerid] = house; PlayerInfo[playerid][pInt] = HouseInfo[house][hInt]; return 1; } } Functia [glow=red,2,300]spawnchange[/glow] iti schimba ori la spawn normal(factiune) ori la casa, uite de exemplu comanda /spawnchange (tot de pe gf) if(strcmp(cmd, "/spawnchange", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pPhousekey] != 255) { if(Spectate[playerid] != 255 && PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_GREY, " Esti spectator nu iti poti schimba spawn-ul acum !"); return 1; } if(SpawnChange[playerid]) { SendClientMessage(playerid, COLOR_GREY, " Deacuma vei fi spawnat la 'spawn normal' !"); SpawnChange[playerid] = 0; if(IsAnInstructor(playerid)) { if(SchoolSpawn[playerid] == 0) { SchoolSpawn[playerid] = 1; SendClientMessage(playerid, COLOR_GREY, " Acum vei fi spawnat la spawn-ul de zboruri !"); } else if(SchoolSpawn[playerid] == 1) { SchoolSpawn[playerid] = 0; SendClientMessage(playerid, COLOR_GREY, " Deacuma vei fi spawnat la scoala de soferi !"); } } } else { SendClientMessage(playerid, COLOR_GREY, " Deacuma te vei spawna la casa dvs. sau unde aveti chirie !"); SpawnChange[playerid] = 1; } } else { if(IsAnInstructor(playerid)) { if(SchoolSpawn[playerid] == 0) { SchoolSpawn[playerid] = 1; SendClientMessage(playerid, COLOR_GREY, " You will now spawn at the Flying School !"); } else if(SchoolSpawn[playerid] == 1) { SchoolSpawn[playerid] = 0; SendClientMessage(playerid, COLOR_GREY, " You will now spawn at the Driving School !"); } } else { SendClientMessage(playerid, COLOR_GREY, " Nu ai chirie undeva sau nu detii o casa !"); return 1; } } } return 1; }Normal trebuie sa definesti spawnchange iar schoolspawn reprezinta factiunea School Instructor daca o ai. In fine aici editezi/stergi cum doresti tu, e foarte simplu (eu ti-am aratat cum e pe GF)
Question
gabyskm96
Salut am un server gf si am o problema cand un jucator isi cumpara casa il spawneaza la civili sau daca e in factiune la factiune.. Cum pot sa ii spawneze in casele lor. comanda spawnchange nu exista :)
1 answer to this question
Recommended Posts