14.08.2016, 06:49
Hello.
My enum Player[playerid][Nick] get's corrupted once i store float in this enums.
This is so weird, because i am nowhere near this command storing something in the nick.
even tho its nowhere to be found in the code.
Did i do something wrong?
Here is my debug code to test where it is:
What it outputs:
Trace is the correct loading for it.
My enum Player[playerid][Nick] get's corrupted once i store float in this enums.
This is so weird, because i am nowhere near this command storing something in the nick.
PHP Code:
new Float:ox,Float:oy,Float:oz,Float:oa;
GetPlayerPos(playerid,ox,oy,oz);
GetPlayerFacingAngle(playerid,oa);
Player[playerid][Oldx] = ox;
Player[playerid][Oldy] = oy;
Player[playerid][Oldz] = oz;
Player[playerid][Olda] = oa;
Did i do something wrong?
Here is my debug code to test where it is:
PHP Code:
COMMAND:tpto(playerid, params[]) {
if(!Player[playerid][Authed] || Player[playerid][Admin] && Player[playerid][Helper]) return SendClientError(playerid, "You are not authorised to use this command.");
new target;
if(Player[playerid][Helper] && !Player[playerid][HelperDuty]) return SendClientError(playerid,"You arn't on helper duty.");
if(sscanf(params, "u", target)) return SendClientUsage(playerid, "/tpto [playerid]");
if(!IsPlayerConnected(target)) return SendClientError(playerid, "That player isn't connected.");
SendClientMessage(playerid,-1,sprintf("%s",Player[playerid][Nick]));
new Float:ox,Float:oy,Float:oz,Float:oa;
GetPlayerPos(playerid,ox,oy,oz);
GetPlayerFacingAngle(playerid,oa);
Player[playerid][Oldx] = ox;
Player[playerid][Oldy] = oy;
Player[playerid][Oldz] = oz;
Player[playerid][Olda] = oa;
SendClientMessage(playerid,-1,sprintf("%s",Player[playerid][Nick]));
new Float:x, Float:y, Float:z; GetPlayerPos(target, x, y, z);
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
SetVehiclePos(vid, x+3,y,z);
SetVehicleVirtualWorld(vid, GetPlayerVirtualWorld(target));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(target));
}
else
{
SetPlayerPos(playerid, x+1.5, y, z);
SetPlayerInterior(playerid, GetPlayerInterior(target));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(target));
}
SendClientMessage(playerid,-1,sprintf("%s",Player[playerid][Nick]));
IRC_GroupSay(Group, "#adminlogs", sprintf("%s tp'ed to %s.", RPName(playerid), RPName(target)));
return 1;
}
Trace is the correct loading for it.