SA-MP Forums Archive
looking for a /spray or /carcolor - 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: looking for a /spray or /carcolor (/showthread.php?tid=305533)



looking for a /spray or /carcolor - scottygraham1990 - 22.12.2011

does any one no were i can get a /spray or /carcolor using zcmd thx


Re: looking for a /spray or /carcolor - skaTim - 22.12.2011

Код:
COMMAND:color(playerid, params[])
{
    if(PlayerInfo[playerid][power] < 6) return SendClientError(playerid, CANT_USE_CMD);
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientError(playerid, "Enter a vehicle first!");
	new iC, iCC;
	if(sscanf(params, "dd", iC, iCC)) return SCP(playerid, "[c1] [c2]");
	ChangeVehicleColor(GetPlayerVehicleID(playerid),iC,iCC);
	return 1;
}



Re: looking for a /spray or /carcolor - IceCube! - 22.12.2011

Hmm heres one I made in 5 seconds in the reply box. Also please try the search button in future.

pawn Code:

pawn Код:
CMD:spray(playerid, params[])
{
   new colour1, colour2;
   if(sscanf(params, "ii", colour1, colour2))
   {
     new Veh = GetPlayerVehicleID(playerid);
     ChangeVehicleColor(vehicleid, colour1, colour2);
     }
     return 1;
}

Tis is gathering you want it for all players.


Re: looking for a /spray or /carcolor - scottygraham1990 - 22.12.2011

Quote:
Originally Posted by skaTim
Посмотреть сообщение
Код:
COMMAND:color(playerid, params[])
{
    if(PlayerInfo[playerid][power] < 6) return SendClientError(playerid, CANT_USE_CMD);
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientError(playerid, "Enter a vehicle first!");
	new iC, iCC;
	if(sscanf(params, "dd", iC, iCC)) return SCP(playerid, "[c1] [c2]");
	ChangeVehicleColor(GetPlayerVehicleID(playerid),iC,iCC);
	return 1;
}
hey i get this error
Код:
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2870) : error 017: undefined symbol "PlayerInfo"
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2870) : warning 215: expression has no effect
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2870) : error 001: expected token: ";", but found "]"
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2870) : error 029: invalid expression, assumed zero
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2870) : fatal error 107: too many error messages on one line



Re: looking for a /spray or /carcolor - skaTim - 22.12.2011

Quote:
Originally Posted by scottygraham1990
Посмотреть сообщение
hey i get this error
Код:
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2870) : error 017: undefined symbol "PlayerInfo"
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2870) : warning 215: expression has no effect
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2870) : error 001: expected token: ";", but found "]"
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2870) : error 029: invalid expression, assumed zero
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2870) : fatal error 107: too many error messages on one line
Weird, it works fine for me.


Re: looking for a /spray or /carcolor - scottygraham1990 - 22.12.2011

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
Hmm heres one I made in 5 seconds in the reply box. Also please try the search button in future.

pawn Код:
CMD:spray(playerid, params[])
{
   new colour1, colour2;
   if(sscanf(params, "ii", colour1, colour2))
   {
     new Veh = GetPlayerVehicleID(playerid);
     ChangeVehicleColor(vehicleid, colour1, colour2);
     }
     return 1;
}
Tis is gathering you want it for all players.
when i uses yours i get this error

C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2874) : error 017: undefined symbol "vehicleid"
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2873) : warning 204: symbol is assigned a value that is never used: "Veh"
C:\Users\Joe\Desktop\new samp\gamemodes\dvdrift.pwn(2873 -- 2876) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


Re: looking for a /spray or /carcolor - IceCube! - 22.12.2011

My bad really sorry
pawn Код:
CMD:spray(playerid, params[])
{
   new colour1, colour2;
   if(sscanf(params, "ii", colour1, colour2))
   {
     new Veh = GetPlayerVehicleID(playerid);
     ChangeVehicleColor(Veh, colour1, colour2);
     }
     return 1;
}
Try this


Re: looking for a /spray or /carcolor - scottygraham1990 - 22.12.2011

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
My bad really sorry
pawn Код:
CMD:spray(playerid, params[])
{
   new colour1, colour2;
   if(sscanf(params, "ii", colour1, colour2))
   {
     new Veh = GetPlayerVehicleID(playerid);
     ChangeVehicleColor(Veh, colour1, colour2);
     }
     return 1;
}
Try this
just tested the command and it does not spray the car


Re: looking for a /spray or /carcolor - [ABK]Antonio - 22.12.2011

that's because it's

pawn Код:
CMD:spray(playerid, params[])
{
   new colour1, colour2;
   if(sscanf(params, "ii", colour1, colour2)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /spray <col1> <col2>");
   new Veh = GetPlayerVehicleID(playerid);
   ChangeVehicleColor(Veh, colour1, colour2);
    return 1;
}
EDIT: also you can

pawn Код:
CMD:carcolour(playerid, params[]) return cmd_spray(playerid, params);



Re: looking for a /spray or /carcolor - [ABK]Antonio - 22.12.2011

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
Hmm heres one I made in 5 seconds in the reply box. Also please try the search button in future.

pawn Code:

pawn Код:
CMD:spray(playerid, params[])
{
   new colour1, colour2;
   if(sscanf(params, "ii", colour1, colour2))
   {
     new Veh = GetPlayerVehicleID(playerid);
     ChangeVehicleColor(vehicleid, colour1, colour2);
     }
     return 1;
}

Tis is gathering you want it for all players.
I think you should read.