14.01.2010, 12:52
FIXED
sscanf() ftw!
Note:sscanf() ftw!
Did a full night (yes, no sleep

(Don't know how I missed this on the wiki.. Oh well.)
Код:
new Float:xxx,Float:yyy,Float:zzz,uid,uce;
Код:
dcmd_j(playerid, params[]) { #pragma unused params if(IsPlayerAdmin(playerid)) { if(sscanf(params, "ui", uid, uce)) { SendClientMessage(playerid, 0xff0000FF, "Usage: \"/j [id] [cell]\""); } else if(uid == INVALID_PLAYER_ID) { SendClientMessage(playerid, 0xFF0000AA, "Player not found"); } else { if(uce == 1 || uce == 2 || uce == 3 || uce == 4) { xxx = 853.75; } else if(uce == 5 || uce == 6 ||uce == 7 || uce == 8) { xxx = 819.25; } if(uce == 1 || uce == 5) { yyy = -2245.50; } else if(uce == 2 || uce == 6) { yyy = -2268.50; } else if(uce == 3 || uce == 7) { yyy = -2291.50; } else if(uce == 4 || uce == 8) { yyy = -2314.50; } zzz = 15.00; } } return 1; }