new gPlayerClass[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid){gPlayerClass[playerid] = classid;switch (classid) {case 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20:{GameTextForPlayer(playerid, \"Civil\", 1000, 3);SetPlayerInterior(playerid,interiorid); SetPlayerPos(playerid,x, y, z));SetPlayerFacingAngle(playerid, z);SetPlayerCameraPos(playerid,x, y, z));SetPlayerCameraLookAt(playerid,x, y, z);}}return 1;}
Probáld meg így:Bemész egy épületbe beírod a következõ parancsot:és amit itt kaptál interior számot azt az OnPlayerRequestClass függvény alá beírod.[pawn] if(!strcmp(cmdtext, \"/interior\", true)){new interior = GetPlayerInterior(playerid); new string[128]; format(string, sizeof(string), \"Interior: %d\", interior); SendClientMessage(playerid,0xFFFFFFAA, string);}return 1;}[/pawn]
SetPlayerInterior(playerid,6);SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);SetWorldTime(12); SetPlayerVirtualWorld(playerid, 0);