"/sethousecar" not working
#1

So this is really the first code I've 100% put together, and it doesn't work D:

Код:
	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;
			}
EDIT:
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
^ Stops there
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)