25.05.2012, 07:36
Here's my code and its not working, it gives me numbers with no DECIAL stuff and its not the Coordinate of the target.
Quote:
new Float: poscord[3]; |
Quote:
CMD:getco(playerid, params[]) { new giveplayerid; if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /getco [playerid]"); GetPlayerPos(giveplayerid, poscord[0], poscord[1], poscord[2]); if(IsPlayerInRangeOfPoint(playerid, 700, poscord[0], poscord[1], poscord[2])) { if(IsPlayerConnected(giveplayerid)) { SetTimer("GetLocation", 4000, 0); SendClientMessage(playerid, COLOR_GRAD4, "Analizing and Calculating Target Coordinates ( 4 Seconds )"); // SendClientMessage(playerid, COLOR_GRAD4, "Target Coordinates X - %d | Y - %d | Z - %d", poscord[0], poscord[1], poscord[2]); } } else { SendClientMessage(playerid, COLOR_GRAD4, "Target Coordinates cannot be taken, range from target is too far"); } return 1; } |
Quote:
forward GetLocation(playerid); public GetLocation(playerid) { new giveplayerid; GetPlayerPos(giveplayerid, poscord[0], poscord[1], poscord[2]); SendClientMessage(playerid, COLOR_GRAD4, "Target Coordinates successfully recieved"); SendClientMessage(playerid, COLOR_GRAD4, "Target Coordinates X - %d | Y - %d | Z - %d", poscord[0], poscord[1], poscord[2]); return 1; } |