Stretcher Command
#1

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

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

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

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

Lol dude, space your shit. -___-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)