29.07.2015, 07:33
I'm trying for over a month to fix this kind of bug?
- I have only 4 putplayerinvehicle functions all over gamemode , and none of them teleport them in rent vehicle.
I want some ideas how to fix this bug , because is really idiotic and i need to fix it
WARN : I saw this :
PutPlayerInVehicle(vid, playerid, 0);
Wasn't correct (playerid,vid)?
- I have only 4 putplayerinvehicle functions all over gamemode , and none of them teleport them in rent vehicle.
Quote:
An player used the gethere command on him , and then he sudently teleported into this vehicle |
Код:
if (!strcmp(cmd, "/gethere", true)) { if (PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pHelper] != 0) { tmp = strtok(cmdtext, idx); if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /gethere [id]"); new gid; gid = ReturnUser(tmp); if (!IsPlayerConnected(gid)) return SendClientMessage(playerid, COLOR_GRAD2, "The player is offline."); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(gid, x+1, y+1, z); SetPlayerInterior(gid, GetPlayerInterior(playerid)); SetPlayerVirtualWorld(gid, GetPlayerVirtualWorld(playerid)); format(string, sizeof(string), "{e53535}(Informatie necesarг){FF6633} %s te-a teleportat la el.",GetName(playerid)); SendClientMessage(gid, -1, string); format(string, sizeof(string), "{e53535}(Informatie necesarг){FF6633} %s a fost teleportat la tine.",GetName(gid)); SendClientMessage(playerid, -1, string); } return true; } if (!strcmp(cmd, "/goto", true)) { if (PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pHelper] != 0) { tmp = strtok(cmdtext, idx); if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /goto [id]"); new gid; gid = ReturnUser(tmp); if (!IsPlayerConnected(gid)) return SendClientMessage(playerid, COLOR_GRAD2, "The player is offline."); new Float:x, Float:y, Float:z; GetPlayerPos(gid, x, y, z); if (IsPlayerInAnyVehicle(playerid)) { new vid = GetPlayerVehicleID(gid); SetVehiclePos(GetPlayerVehicleID(playerid), x+1,y+1,z); PutPlayerInVehicle(vid, playerid, 0); return true; } SetPlayerPos(playerid, x+1, y+1, z); SetPlayerInterior(playerid, GetPlayerInterior(gid)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(gid)); format(string, sizeof(string), "{e53535}(Informatie necesarг){FF6633} %s s-a teleportat la tine.",GetName(playerid)); SendClientMessage(gid, -1, string); format(string, sizeof(string), "%s s-a teleportat la jucгtorul %s",GetName(playerid), GetName(gid)); TrimiteEchipa(string); } return true; }
WARN : I saw this :
PutPlayerInVehicle(vid, playerid, 0);
Wasn't correct (playerid,vid)?