/GETRRK NOT WORKING PERFECT
#1

Код:
Код:
CMD:getrrk(playerid, params[])
{
    if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new inscar = GetPlayerVehicleID(playerid), inseat;
	        if(!(GetVehicleModel(inscar) == 416)) { SendClientMessage(playerid, COLOR_GREY, "   You must be inside an ambulance !"); return 1; }
	        inseat = GetPlayerVehicleSeat(playerid);
	        if(inseat == 2 || inseat == 3)
	        {
	            if(HasARapidResKit[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "   You already have a Rapid Response Kit, '/pickrrk' in order to pick it up."); return 1; }
	            RemovePlayerFromVehicle(playerid);
	            SetTimerEx("GetResponseKit", 1500, false, "i", playerid);
           		format(string, sizeof(string), "* You have succesfully dragged the Rapid Response Kit from the ambulance.");
	            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	            format(string, sizeof(string), "* Paramedic %s drags the Rapid Response Kit from the back of the ambulance.", PlayerRPName(playerid));
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "   You must be in the rear of the ambulance in order to use this  !");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_GREY, "   You are not inside a vehicle !");
		}
	}
	else
	{
		SendClientMessage(playerid, COLOR_GREY, "   You are not a Paramedic !");
	}
	return 1;
}
I NEED TO HELP IN THIS IF SERVER START ITS SOMETIME WORK BUT NOT ALL TIME AND AFTER USE 1 TIME ITS WORK ANYMORE PLZ HELP {SORRY FOR MY BAD ENGLISH}
Reply
#2

Try this out
pawn Код:
CMD:getrrk(playerid, params[])
{
    if(PlayerInfo[playerid][pMember] != 4 && PlayerInfo[playerid][pLeader] != 4) return SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic !");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not inside a vehicle !");
    if(HasARapidResKit[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "   You already have a Rapid Response Kit, '/pickrrk' in order to pick it up.")

    new inscar = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(inscar) != 416) return SendClientMessage(playerid, COLOR_GREY, "You must be inside an ambulance !");
   
    new inseat = GetPlayerVehicleSeat(playerid);
    if(inseat != 2 && inseat != 3) return SendClientMessage(playerid, COLOR_GREY, "You must be in the rear of the ambulance in order to use this  !");

    RemovePlayerFromVehicle(playerid);
    SetTimerEx("GetResponseKit", 1500, false, "i", playerid);
    format(string, sizeof(string), "* You have succesfully dragged the Rapid Response Kit from the ambulance.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Paramedic %s drags the Rapid Response Kit from the back of the ambulance.", PlayerRPName(playerid));
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
}
What does it say when it "doesn't work" ?
Reply
#3

[QUOTE=xVIP3Rx;3540284]Try this out
pawn Код:
CMD:getrrk(playerid, params[])
{
    if(PlayerInfo[playerid][pMember] != 4 && PlayerInfo[playerid][pLeader] != 4) return SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic !");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not inside a vehicle !");
    if(HasARapidResKit[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "   You already have a Rapid Response Kit, '/pickrrk' in order to pick it up.")

    new inscar = GetPlayerVehicleID(playerid); ///// ERROR HERE ''NEW''
    if(GetVehicleModel(inscar) != 416) return SendClientMessage(playerid, COLOR_GREY, "You must be inside an ambulance !");
   
    new inseat = GetPlayerVehicleSeat(playerid);
    if(inseat != 2 && inseat != 3) return SendClientMessage(playerid, COLOR_GREY, "You must be in the rear of the ambulance in order to use this  !");

    RemovePlayerFromVehicle(playerid);
    SetTimerEx("GetResponseKit", 1500, false, "i", playerid);
    format(string, sizeof(string), "* You have succesfully dragged the Rapid Response Kit from the ambulance.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Paramedic %s drags the Rapid Response Kit from the back of the ambulance.", PlayerRPName(playerid));
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
}
error 001: expected token: ";", but found "new"

NO MORE ERROR
Reply
#4

Yeah my bad, here you go
pawn Код:
CMD:getrrk(playerid, params[])
{
    if(PlayerInfo[playerid][pMember] != 4 && PlayerInfo[playerid][pLeader] != 4) return SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic !");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not inside a vehicle !");
    if(HasARapidResKit[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "   You already have a Rapid Response Kit, '/pickrrk' in order to pick it up.");

    new inscar = GetPlayerVehicleID(playerid); ///// ERROR HERE ''NEW''
    if(GetVehicleModel(inscar) != 416) return SendClientMessage(playerid, COLOR_GREY, "You must be inside an ambulance !");

    new inseat = GetPlayerVehicleSeat(playerid);
    if(inseat != 2 && inseat != 3) return SendClientMessage(playerid, COLOR_GREY, "You must be in the rear of the ambulance in order to use this  !");

    RemovePlayerFromVehicle(playerid);
    SetTimerEx("GetResponseKit", 1500, false, "i", playerid);
    format(string, sizeof(string), "* You have succesfully dragged the Rapid Response Kit from the ambulance.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Paramedic %s drags the Rapid Response Kit from the back of the ambulance.", PlayerRPName(playerid));
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
}
Reply
#5

no error but kit object dont show and thats same problum ...maybe now main problum is kit dont show
Reply
#6

Why did you steal this from SARP's script?
Reply
#7

Quote:
Originally Posted by Puppy
Посмотреть сообщение
Why did you steal this from SARP's script?
bro i dont know what script is this u can also download in samp gamemode script section i just download....

sorry for its relesing...gamemode
Reply
#8

Show me "public GetResponseKit"
Reply
#9

[CODE]
Quote:

public GetResponseKit(playerid)
{
new Float, Float:y, Float:z, FloatAngle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, pAngle);
SetPlayerFacingAngle(playerid, pAngle+180);
RapidResKit[playerid] = CreateObject(1789, x, y, z, 0, 0, 0);
AttachObjectToPlayer(RapidResKit[playerid], playerid, 0.00, 1, -0.5, 0, 0, -90);
RapidResKitActive[playerid] = 1;
HasARapidResKit[playerid] = 1;
return 1;
}

[CODE]
Reply
#10

help bro..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)