12.04.2018, 03:36
Hi, am new to samp forums and typically dont have a lot of internet access these days though am still highly interested in SAMP in general. So my problem comes when am working on a gamemode script trying to create a command that changes a players virtual world. The command works though when I enter the command as "/setvw [ID] 1" it returns a message saying changed virtual world to 1.0 which actually takes me to virtual world 10663244 so now am stuck trying to figure out where I went wrong and i'd your assistance.
Here's the command I made:
Here's the command I made:
Код:
CMD:setvw(playerid, params[]) { //if(pInfo[playerid][AdminLvl] < 1) return -1; if(pInfo[playerid][AdminLvl] >= 7 || IsPlayerAdmin(playerid)) { if(!pAdmDuty{playerid}) { new targetid, str[100], VirtualWorld; if(sscanf(params, "uf", targetid, VirtualWorld)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setvw [ID] [VW]") ; if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "That player is not connected.") ; SetPlayerVirtualWorld(targetid, VirtualWorld); format(str, sizeof str, "*Admin %s has set %s's virtual world to %0.1f", pName[playerid], pName[targetid], VirtualWorld); SendAdminMessage(str); } else { return SendClientMessage(playerid, COLOR_RED, "You're not on admin duty."); } } else { return -1; } return 1; }