Positions command problems...2
#1

I need u'll cause that works caudser everytime I'm in thr right position and still thats send me the client message that :

"You're not at the right place"



:

Код:
CMD:getdeliver(playerid, params[])
{
 if (PlayerInfo[playerid][pJob] != 0 && PlayerInfo[playerid][pJob2] != 0)
 {
  SendClientMessageEx(playerid,COLOR_GREY,"   You are not working in other job already [For work for that /quitjob]");
  return 1;
 }
    new vehicleid = GetPlayerVehicleID(playerid);
    if(!(IsADeliverCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER))
 {
     SendClientMessageEx(playerid,COLOR_GREY,"   You need to be driving a Deliver in Deliver Truck!");
     return 1;
 }
 new playername[MAX_PLAYER_NAME];
 GetPlayerName(playerid, playername, sizeof(playername));
    if(!IsPlayerInRangeOfPoint(playerid,0,3084.1438,603.6863,3.0991) && !IsPlayerInRangeOfPoint(playerid,0,3088.3657,600.0442,3.0991) && !IsPlayerInRangeOfPoint(playerid,0,3091.9426,596.9791,3.0991) && !IsPlayerInRangeOfPoint(playerid,0,3095.5442, 593.9920, 3.0991)) return SendClientMessage(playerid,COLOR_RED,"You're not at the right place");

 if(GetPVarInt(playerid, "Delivering") > 0)
 {
  SendClientMessageEx(playerid, COLOR_GREY, "   You are already delivering the illeagel stuff!");
  return 1;
 }

{
    SetPlayerCheckpoint(playerid,  2784.85, -2455.96, 13.63, 3.0);
    return 1;
}

 new szMessage[128];
 format(szMessage, sizeof(szMessage), "You have picked up the Deliver for SPAS-12 Weapon! ");
 SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
 GivePlayerWeapon(playerid, 27, 999999);
 for(new i = 1; i <= MAX_VEHICLES; i++)
 {
	SetVehicleToRespawn(i);
 }
 return 1;
}
Reply
#2

Are you sure you are in the same coordinates as in your code ? if yes, are you sure you added IsPlayerInRangeOfPoint in your script (not this code)
Reply
#3

Yeah man I'm sure... In that post I didnt post the fully code so I've been compacitad with the full code and the other one already fixed , Check it...

https://sampforum.blast.hk/showthread.php?tid=431048

But remember try to fix please the right and fully code...
Reply
#4

pawn Код:
CMD:getdeliver(playerid, params[])
{
 if (PlayerInfo[playerid][pJob] != 0 && PlayerInfo[playerid][pJob2] != 0)
 {
  SendClientMessageEx(playerid,COLOR_GREY,"   You are not working in other job already [For work for that /quitjob]");
  return 1;
 }
    new vehicleid = GetPlayerVehicleID(playerid);
    if(!(IsADeliverCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER))
 {
     SendClientMessageEx(playerid,COLOR_GREY,"   You need to be driving a Deliver in Deliver Truck!");
     return 1;
 }
 new playername[MAX_PLAYER_NAME];
 GetPlayerName(playerid, playername, sizeof(playername));
    if(!IsPlayerInRangeOfPoint(playerid,5,3084.1438,603.6863,3.0991) || !IsPlayerInRangeOfPoint(playerid,5,3088.3657,600.0442,3.0991) || !IsPlayerInRangeOfPoint(playerid,5,3091.9426,596.9791,3.0991) || !IsPlayerInRangeOfPoint(playerid,5,3095.5442, 593.9920, 3.0991)) return SendClientMessage(playerid,COLOR_RED,"You're not at the right place");

 if(GetPVarInt(playerid, "Delivering") > 0)
 {
  SendClientMessageEx(playerid, COLOR_GREY, "   You are already delivering the illeagel stuff!");
  return 1;
 }

{
    SetPlayerCheckpoint(playerid,  2784.85, -2455.96, 13.63, 3.0);
    return 1;
}

 new szMessage[128];
 format(szMessage, sizeof(szMessage), "You have picked up the Deliver for SPAS-12 Weapon! ");
 SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
 GivePlayerWeapon(playerid, 27, 999999);
 for(new i = 1; i <= MAX_VEHICLES; i++)
 {
    SetVehicleToRespawn(i);
 }
 return 1;
}
Try this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)