looking for a /spray or /carcolor
#1

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

Код:
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;
}
Reply
#3

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.
Reply
#4

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
Reply
#5

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.
Reply
#6

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
Reply
#7

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
Reply
#8

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
Reply
#9

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);
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)