[HELP]need /back and /v command
#7

Quote:
Originally Posted by PrawkC
Посмотреть сообщение
You need ZCMD and sscanf

Put these at the top of your script, it may also be a good idea to make them equal 0 on player disconnect
pawn Код:
new Float:pPos[MAX_PLAYERS][3]; //Array for xyz, 0 = x, 1 = y, 2 = z
new pInt[MAX_PLAYERS]; // The interior the player was in
pawn Код:
CMD:stunt(playerid, params[])
{
    GetPlayerPos(playerid, pPos[playerid][0], pPos[playerid][1], pPos[playerid][2]); //Stores the players positons in an array
    pInt[playerid] = GetPlayerInterior(playerid); //Stores the players interior
    SetPlayerPos(playerid, -1114.1460, 378.5243, 14.1484);
    SetPlayerInterior(playerid, 0);
    SendClientMessage(playerid, -1,"Sekarang Anda Telah Memasuki /stunt");
    return 1;
}

CMD:back(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid, 50.0, -1114.1460, 378.5243, 14.1484)) return SendClientMessage(playerid, -1, "You must be near the stunt course!");
    SetPlayerPos(playerid, pPos[playerid][0], pPos[playerid][1], pPos[playerid][2]); //Sets the players position to the position we saved in /stunt
    SetPlayerInterior(playerid, pInt[playerid]); //Sets the interior to the one we saved in /stunt
    return 1;
}

CMD:v(playerid, params[])
{
    new carId, Float:x, Float:y, Float:z;
    if(sscanf(params, "i", carId)) return SendClientMessage(playerid, -1, "Syntax: /v carId");
    if(carId < 400 || carId > 611) return SendClientMessage(playerid, -1, "Invalid car Id, (400 - 611)");
    if(!IsPlayerInRangeOfPoint(playerid, 15.0, -1114.1460, 378.5243, 14.1484)) return SendClientMessage(playerid, -1, "You must be near the stunt course!"); //This checks if you're near the stun area
    GetPlayerPos(playerid, x, y, z);
    CreateVehicle(carId, x, y + 5, z, 0,-1, -1, -1);
    SendClientMessage(playerid, -1, "Car spawned at your location!");
    return 1;
}
i must make new filterscript?if i must make new filtersript where must i put that code?or if i must on put on my gamemode where i must input?
Reply


Messages In This Thread
[HELP]need /back and /v command - by Horrible - 17.06.2011, 12:32
Re: [HELP]need /back and /v command - by sim_sima - 17.06.2011, 12:44
Re: [HELP]need /back and /v command - by Horrible - 18.06.2011, 01:01
Re: [HELP]need /back and /v command - by maramizo - 18.06.2011, 03:01
Re: [HELP]need /back and /v command - by Horrible - 18.06.2011, 03:42
Re: [HELP]need /back and /v command - by PrawkC - 18.06.2011, 07:21
Re: [HELP]need /back and /v command - by Horrible - 18.06.2011, 10:56
Re: [HELP]need /back and /v command - by alpha500delta - 18.06.2011, 11:04
Re: [HELP]need /back and /v command - by Horrible - 18.06.2011, 11:27
Re: [HELP]need /back and /v command - by ricardo178 - 18.06.2011, 11:31
Re: [HELP]need /back and /v command - by Horrible - 18.06.2011, 11:34
Re: [HELP]need /back and /v command - by alpha500delta - 18.06.2011, 12:42
Re: [HELP]need /back and /v command - by Horrible - 19.06.2011, 00:55
Re: [HELP]need /back and /v command - by Horrible - 19.06.2011, 07:07
Re: [HELP]need /back and /v command - by Wesley221 - 19.06.2011, 09:29
Re: [HELP]need /back and /v command - by Horrible - 20.06.2011, 10:59

Forum Jump:


Users browsing this thread: 3 Guest(s)