CMD:goto(playerid, params[]) { if(playerVariables[playerid][pAdminLevel] >= 1) { new userID; new vehicleid = GetPlayerVehicleID(userID); if(sscanf(params, "u", userID)) { return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/goto [playerid]"); } else { if(!IsPlayerConnected(userID)) return SendClientMessage(playerid, COLOR_GREY, "The specified player ID is either not connected or has not authenticated."); new messageString[64]; new Float: fPos[3]; GetPlayerPos(userID, fPos[0], fPos[1], fPos[2]); if(IsPlayerInAnyVehicle(userID) && GetPlayerState(userID) == PLAYER_STATE_DRIVER) { LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(userID)); SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(userID)); PutPlayerInVehicle(playerid, vehicleid, 1); SetPlayerPos(playerid, fPos[0]+2, fPos[1], fPos[2]); } else { SetPlayerPos(playerid, fPos[0]+2, fPos[1], fPos[2]); SetVehiclePos(GetPlayerVehicleID(playerid), fPos[0], fPos[1]+2, fPos[2]); } SetPlayerInterior(playerid, GetPlayerInterior(userID)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(userID)); GetPlayerName(userID, szPlayerName, MAX_PLAYER_NAME); format(messageString, sizeof(messageString), "You have teleported to %s.", szPlayerName); SendClientMessage(playerid, COLOR_WHITE, messageString); IsOnDM[playerid] = IsOnDM[userID]; InBizz[playerid] = InBizz[userID]; InHouse[playerid] = InHouse[userID]; InHQ[playerid] = InHQ[userID]; } } return 1; }
CMD:goto(playerid, params[]) { if(playerVariables[playerid][pAdminLevel] >= 1) { new userID; if(sscanf(params, "u", userID)) { return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/goto [playerid]"); } else { if(!IsPlayerConnected(userID)) return SendClientMessage(playerid, COLOR_GREY, "The specified player ID is either not connected or has not authenticated."); new messageString[64]; new Float: fPos[3]; GetPlayerPos(userID, fPos[0], fPos[1], fPos[2]); if(IsPlayerInAnyVehicle(userID) && GetPlayerState(userID) == PLAYER_STATE_DRIVER) { new vehicleid = GetPlayerVehicleID(userID); LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(userID)); SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(userID)); PutPlayerInVehicle(playerid, vehicleid, 1); SetPlayerPos(playerid, fPos[0]+2, fPos[1], fPos[2]); } else { SetPlayerPos(playerid, fPos[0]+2, fPos[1], fPos[2]); SetVehiclePos(GetPlayerVehicleID(playerid), fPos[0], fPos[1]+2, fPos[2]); } SetPlayerInterior(playerid, GetPlayerInterior(userID)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(userID)); GetPlayerName(userID, szPlayerName, MAX_PLAYER_NAME); format(messageString, sizeof(messageString), "You have teleported to %s.", szPlayerName); SendClientMessage(playerid, COLOR_WHITE, messageString); IsOnDM[playerid] = IsOnDM[userID]; InBizz[playerid] = InBizz[userID]; InHouse[playerid] = InHouse[userID]; InHQ[playerid] = InHQ[userID]; } } return 1; }
CMD:goto(playerid, params[]) { if(playerVariables[playerid][pAdminLevel] >= 1) { new userID; new vehicleid = GetPlayerVehicleID(userID); if(sscanf(params, "u", userID)) { return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/goto [playerid]"); } else { if(!IsPlayerConnected(userID)) return SendClientMessage(playerid, COLOR_GREY, "The specified player ID is either not connected or has not authenticated."); new messageString[64]; new Float: fPos[3]; GetPlayerPos(userID, fPos[0], fPos[1], fPos[2]); if(IsPlayerInAnyVehicle(userID) && GetPlayerState(userID) == PLAYER_STATE_DRIVER) { LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(userID)); SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(userID)); PutPlayerInVehicle(playerid, vehicleid, 1); SetPlayerPos(playerid, fPos[0]+2, fPos[1], fPos[2]); } else if(IsPlayerInAnyVehicle(userID) && getEmptySeat(GetPlayerVehicleID(userID))>-1){ PutPlayerInVehicle(playerid, GetPlayerVehicleID(userID), getEmptySeat(GetPlayerVehicleID(userID))); } else { SetPlayerPos(playerid, fPos[0]+2, fPos[1], fPos[2]); SetVehiclePos(GetPlayerVehicleID(playerid), fPos[0], fPos[1]+2, fPos[2]); } SetPlayerInterior(playerid, GetPlayerInterior(userID)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(userID)); GetPlayerName(userID, szPlayerName, MAX_PLAYER_NAME); format(messageString, sizeof(messageString), "You have teleported to %s.", szPlayerName); SendClientMessage(playerid, COLOR_WHITE, messageString); IsOnDM[playerid] = IsOnDM[userID]; InBizz[playerid] = InBizz[userID]; InHouse[playerid] = InHouse[userID]; InHQ[playerid] = InHQ[userID]; } } return 1; }
stock getEmptySeat(vehicleid) { new i, free; for(i=0; i<GetMaxSeats(vehicleid); i++){ free = i; foreach(Player, x) { if(GetPlayerVehicleID(x) == vehicleid && GetPlayerVehicleSeat(x) == i) free = -1; } if(free!=-1) return i; } return -1; } stock GetMaxSeats(vehicleid){ return MaxSeats[(GetVehicleModel(vehicleid) - 400)]; } stock checkVehicleSeat(vehicleid, seatid) { foreach(Player, x) { if(GetPlayerVehicleID(x) == vehicleid && GetPlayerVehicleSeat(x) == seatid) return 1; } return 0; } new MaxSeats[212] = { 4,2,2,2,4,4,1,2,2,4,2,2,2,4,2,2,4,2,4,2,4,4,2,2,2,1,4,4,4,2,1,9,1,2,2,1,2,9,4,2, 4,1,2,2,2,4,1,2,1,6,1,2,1,1,1,2,2,2,4,4,2,2,2,2,2,2,4,4,2,2,4,2,1,1,2,2,1,2,2,4, 2,1,4,3,1,1,1,4,2,2,4,2,4,1,2,2,2,4,4,2,2,2,2,2,2,2,2,4,2,1,1,2,1,1,2,2,4,2,2,1, 1,2,2,2,2,2,2,2,2,4,1,1,1,2,2,2,2,0,0,1,4,2,2,2,2,2,4,4,2,2,4,4,2,1,2,2,2,2,2,2, 4,4,2,2,1,2,4,4,1,0,0,1,1,2,1,2,2,2,2,4,4,2,4,1,1,4,2,2,2,2,6,1,2,2,2,1,4,4,4,2, 2,2,2,2,4,2,1,1,1,4,1,1 };
new MaxSeats[] = { 4,2,2,2,4,4,1,2,2,4,2,2,2,4,2,2,4,2,4,2,4,4,2,2,2,1,4,4,4,2,1,500,1,2,2,0,2,500,4,2,4,1,2,2,2,4,1,2, 1,0,0,2,1,1,1,2,2,2,4,4,2,2,2,2,1,1,4,4,2,2,4,2,1,1,2,2,1,2,2,4,2,1,4,3,1,1,1,4,2,2,4,2,4,1,2,2,2,4, 4,2,2,1,2,2,2,2,2,4,2,1,1,2,1,1,2,2,4,2,2,1,1,2,2,2,2,2,2,2,2,4,1,1,1,2,2,2,2,500,500,1,4,2,2,2,2,2, 4,4,2,2,4,4,2,1,2,2,2,2,2,2,4,4,2,2,1,2,4,4,1,0,0,1,1,2,1,2,2,1,2,4,4,2,4,1,0,4,2,2,2,2,0,0,500,2,2, 1,4,4,4,2,2,2,2,2,4,2,0,0,0,4,0,0};
You missed
Код:
new MaxSeats[] = { 4,2,2,2,4,4,1,2,2,4,2,2,2,4,2,2,4,2,4,2,4,4,2,2,2,1,4,4,4,2,1,500,1,2,2,0,2,500,4,2,4,1,2,2,2,4,1,2, 1,0,0,2,1,1,1,2,2,2,4,4,2,2,2,2,1,1,4,4,2,2,4,2,1,1,2,2,1,2,2,4,2,1,4,3,1,1,1,4,2,2,4,2,4,1,2,2,2,4, 4,2,2,1,2,2,2,2,2,4,2,1,1,2,1,1,2,2,4,2,2,1,1,2,2,2,2,2,2,2,2,4,1,1,1,2,2,2,2,500,500,1,4,2,2,2,2,2, 4,4,2,2,4,4,2,1,2,2,2,2,2,2,4,4,2,2,1,2,4,4,1,0,0,1,1,2,1,2,2,1,2,4,4,2,4,1,0,4,2,2,2,2,0,0,500,2,2, 1,4,4,4,2,2,2,2,2,4,2,0,0,0,4,0,0}; |
Just a second I'm testing it, Thx brothers for reply
EDIT: I get this error: error 017: undefined symbol "MaxSeats" |
new MaxSeats[] = { 4,2,2,2,4,4,1,2,2,4,2,2,2,4,2,2,4,2,4,2,4,4,2,2,2,1,4,4,4,2,1,500,1,2,2,0,2,500,4,2,4,1,2,2,2,4,1,2, 1,0,0,2,1,1,1,2,2,2,4,4,2,2,2,2,1,1,4,4,2,2,4,2,1,1,2,2,1,2,2,4,2,1,4,3,1,1,1,4,2,2,4,2,4,1,2,2,2,4, 4,2,2,1,2,2,2,2,2,4,2,1,1,2,1,1,2,2,4,2,2,1,1,2,2,2,2,2,2,2,2,4,1,1,1,2,2,2,2,500,500,1,4,2,2,2,2,2, 4,4,2,2,4,4,2,1,2,2,2,2,2,2,4,4,2,2,1,2,4,4,1,0,0,1,1,2,1,2,2,1,2,4,4,2,4,1,0,4,2,2,2,2,0,0,500,2,2, 1,4,4,4,2,2,2,2,2,4,2,0,0,0,4,0,0};