05.03.2011, 18:09
(
Последний раз редактировалось antonio112; 06.03.2011 в 06:26.
)
Hello people. I want to make a script request.
Alright, so basically what I want to do, is block all Pay'n Sprays with a gate, so you can`t drive inside but what you can do is use a /paintcar command, if you're in front of Pay'n Spray, which teleports you inside the Pay'n Spray.
Now, what I need, is a timer, that occurs at 10 seconds after you typed /paintcar, which teleports you right outside the Pay'n Spray.
Here`s the /paintcar command ...
Thank you.
Later edit: I did some working ... and finally somehow I made it ... So, here`s what I did.
I made a global array
And defined it in the CMD: paintcar
Made a new function:
And set a timer, in the command, with:
But I have another problem. So, basically, the teleport thingy works ... but I don`t receive the message from the PayNSpray1 public, this one:
Anyone knows the problem?
Thank you.
Alright, so basically what I want to do, is block all Pay'n Sprays with a gate, so you can`t drive inside but what you can do is use a /paintcar command, if you're in front of Pay'n Spray, which teleports you inside the Pay'n Spray.
Now, what I need, is a timer, that occurs at 10 seconds after you typed /paintcar, which teleports you right outside the Pay'n Spray.
Here`s the /paintcar command ...
pawn Код:
CMD:paintcar( playerid, params[] )
{
if ( !IsPlayerInRangeOfPoint( playerid, 2.0, 2074.2097, -1831.4398, 13.5469 ) )
return 1;
if ( !IsPlayerInAnyVehicle( playerid ) )
return SendClientMessage( playerid, -1, "You must be in a "COL_LIGHTBLUE"vehicle{FFFFFF} to use this command." );
if ( sscanf( params, "ii", params[ 0 ], params[ 1 ] ) )
return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /paintcar <color 1> <color 2>" );
if ( params[ 0 ] < 0 || params[ 0 ] > 252 || params[ 1 ] < 0 || params[ 1 ] > 252 )
return SendClientMessage( playerid, -1, ""COL_LRED"VEHICLE{FFFFFF}: Invalid "COL_LIGHTBLUE"color ID{FFFFFF}. Valid "COL_LIGHTBLUE"color ID{FFFFFF}: "COL_GREEN"0 - 252" );
new vehicleid = GetPlayerVehicleID( playerid );
SetVehiclePos( vehicleid, 2064.2068, -1831.4756, 13.5469 );
SetVehicleZAngle( vehicleid, 89.7299 );
GivePlayerMoney( playerid, -1000 );
ChangeVehicleColor( vehicleid, params[ 0 ], params[ 1 ] );
//SendClientMessage( playerid, -1, "Your "COL_LIGHTBLUE"vehicle{FFFFFF} has been resprayed." );
return 1;
}
Later edit: I did some working ... and finally somehow I made it ... So, here`s what I did.
I made a global array
pawn Код:
new PaynSprayVeh
pawn Код:
PaynSprayVeh = GetPlayerVehicleID( playerid );
pawn Код:
forward PayNSpray1( playerid );
public PayNSpray1( playerid )
{
SetVehiclePos( PaynSprayVeh, 2074.2097, -1831.4398, 13.5469 );
SendClientMessage( playerid, -1, "Your car has been fully resprayed" );
return 1;
}
pawn Код:
SetTimer( "PayNSpray1", 10000, 0 );
pawn Код:
SendClientMessage( playerid, -1, "Your car has been fully resprayed" );
Thank you.

