..... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ..... (
/showthread.php?tid=287245)
..... -
Zonoya - 02.10.2011
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
Re: ..... -
Jack_Leslie - 02.10.2011
s is for string.
change s to d.
Re: ..... -
Pharrel - 02.10.2011
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. :@
Re: ..... -
Zonoya - 02.10.2011
ty its working now