16.06.2011, 04:33
So this is really the first code I've 100% put together, and it doesn't work D:
EDIT:
I've got it to work to this point
^ Stops there
Код:
if(strcmp(cmd, "/sethousecar", true) == 0) { if(!PlayerInfo[playerid][pAdmin] >=4) { SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command!"); return 1; } tmp = strtok(cmdtext, idx); if (!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /sethousecar [playerid] [vehicle id] e.g. 444"); return 1; } else { new playac; new chousecar; playac = ReturnUser(tmp); chousecar = strvalEx(tmp); HouseVehicleIDTemp[playac] = CreateVehicle(PlayerInfo[playac][chousecar],PlayerInfo[playac][pHouseCarX],PlayerInfo[playac][pHouseCarY],PlayerInfo[playac][pHouseCarZ],PlayerInfo[playac][pHouseCarFacing],PlayerInfo[playac][pHouseCarColor],PlayerInfo[playac][pHouseCarColor2], 900); SendClientMessage(playerid, COLOR_RED, "You have set %s housecar to %d", playac, chousecar); return 1; } return 1; }
I've got it to work to this point
Код:
tmp = strtok(cmdtext, idx); if (!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /sethousecar [playerid] [vehicle id] e.g. 444"); return 1; } else