#1

this command is being a pain its not spawning the car id with the colors the Admin specifies here is the code:

Код:
dcmd_Vehicle(playerid, params[])
{
	new string[128];
	new Float:X, Float:Y, Float:Z, Float:A;
	new MODEL, COL1, COL2;
	if(!(pInfo[playerid][AdminLevel] >=2)) return SendClientMessage(playerid, RED, "ERROR: You need to be administrator to use this command!" );
	if(sscanf(params, "sss", MODEL, COL1, COL2)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/Vehicle [modelid] [Color1] [Color2]");
	{
	    GetPlayerPos(playerid, X, Y, Z);
	    GetPlayerFacingAngle(playerid, A);
	    format(string, sizeof(string), "You Have Spawned a car. Model ID: %d Color 1: %d Color 2: %d", MODEL, COL1, COL2);
	    SendClientMessage(playerid, ABLUE, string);
	    CreateVehicle(MODEL, X, Y, Z, A, COL1, COL2, 60);
	}
	return 1;
}
i dont know the problem its not making errors
Reply
#2

s is for string.
change s to d.
Reply
#3

pawn Код:
dcmd_Vehicle(playerid, params[])
{
    new string[128];
    new Float:X, Float:Y, Float:Z, Float:A;
    new MODEL, COL1, COL2;
    if(!(pInfo[playerid][AdminLevel] >=2)) return SendClientMessage(playerid, RED, "ERROR: You need to be administrator to use this command!" );
    if(sscanf(params, "iii", MODEL, COL1, COL2)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/Vehicle [modelid] [Color1] [Color2]");
    {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, A);
        format(string, sizeof(string), "You Have Spawned a car. Model ID: %d Color 1: %d Color 2: %d", MODEL, COL1, COL2);
        SendClientMessage(playerid, ABLUE, string);
        CreateVehicle(MODEL, X, Y, Z, A, COL1, COL2, 60);
    }
    return 1;
}
This forum requires that you wait 120 seconds between posts. Please try again in 79 seconds. :@
Reply
#4

ty its working now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)