SA-MP Forums Archive
Stretcher Command - 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: Stretcher Command (/showthread.php?tid=356290)



Stretcher Command - grantism - 03.07.2012

pawn Код:
CMD:stretcher(playerid, params[])
{
    new seatid, playerb, string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsALSFMD(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You aren't in the LSFMD faction.");
    if(!PlayerInfo[playerid][pFacDuty]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
    if(sscanf(params, "ui", playerb, seatid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /stretcher [playerid] [seatid]");
    if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
    if(!IsPlayerNearPlayer(playerid, playerb, 2)) return SendClientMessage(playerid, COLOR_GREY, "You can't put them on a stretcher from this distance.");
    if(playerid == playerb) return SendClientMessage(playerid, COLOR_GREY, "You can't put your self on the stretcher.");
    if(!IsLSFMDVehicle(LastCar[playerid])) return SendClientMessage(playerid, COLOR_GREY, "You need an LSFMD vehicle to put someone on a stretcher.");
    if(seatid < 2 || seatid > 3) return SendClientMessage(playerid, COLOR_GREY, "You can only place people in seats 2 and 3.");
    format(string, sizeof(string), "* %s grabs %s on the stretcher taking them inside the LSFMD vehicle.", RPN(playerid), RPN(playerb));
    SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
    PutPlayerInVehicle(playerb, LastCar[playerid], seatid);
    return 1;
}
Anyone know whats wrong with it? It says the local message, but the person stays in the same place, doesn't move.


Re: Stretcher Command - LaGrande - 03.07.2012

imo there's something gay in LastCar[playerid].


Re: Stretcher Command - MP2 - 03.07.2012

Quote:
Originally Posted by LaGrande
Посмотреть сообщение
imo there's something gay in LastCar[playerid].
A very detailed insight, good work. You should be a beta tester.

1. Learn to space your code out so it's not a wall of text.
2. Check the ID that is stored in LastCar by printing it (SendClientMessage).


Respuesta: Re: Stretcher Command - Chris1337 - 03.07.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
A very detailed insight, good work. You should be a beta tester.

1. Learn to space your code out so it's not a wall of text.
2. Check the ID that is stored in LastCar by printing it (SendClientMessage).
LMFAO with your comment +rep to u , ye debbugging the code is a good option


Re: Stretcher Command - M1N1 - 03.07.2012

Lol dude, space your shit. -___-