SetPlayerMarkerForPlayer or SetPlayerCheckpoint? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetPlayerMarkerForPlayer or SetPlayerCheckpoint? (
/showthread.php?tid=128533)
SetPlayerMarkerForPlayer or SetPlayerCheckpoint? -
cruising - 18.02.2010
Hi!
i have a call system for cop,medic,taxi,towing.
im trying to figure out how to make the player who calls for help visible for cops,medics,taxi,towing service.
SetPlayerMarkerForPlayer or SetPlayerCheckpoint?
i guess the checkpoint would be a better choice? You call for a Mechanic and tells whats wrong, and a Mechanic on duty gets a message and a checkpoint to where the player are
should i put it here somewhere (this is for Mechanics)
Код:
if(Mobile[playerid] == 123)
{
if(!strlen(tmp))
{
SCM(playerid, COLOR_YELLOW, "Mechanic Central: What's your current position?");
return 0;
}
strmid(WorkAtom[playerid][Description], text, 0, strlen(text), 255);
new UserName2[MAX_PLAYER_NAME];
new giveplayerid = ReturnUser(tmp);
SCM(playerid, COLOR_YELLOW, "Mechanic Central Says: We will dispatch a car as soon as possible!");
GetPlayerName(giveplayerid, UserName2, sizeof(UserName2));
format(Text, sizeof(Text), "Tow Truck needed by %s, Position: %s", UserName, WorkAtom[playerid][Description]);
SendOnDutyMecMessage(Text);
SCM(playerid, COLOR_YELLOW, "They hung up!");
Mobile[playerid] = 255;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
return 0;
}
or here? (still for Mechanics)
Код:
if(number == 123)
{
if(Mecs == 0)
{
SCM(playerid, COLOR_YELLOW, "Mechanic Central Says: Sorry we got no mechanics on duty right now!");
SCM(playerid, COLOR_YELLOW, "They Hung Up...");
Mobile[playerid] = 255;
SetTimerEx("StopPhone", 1000, 0, "i", playerid);
return 1;
}
SCM(playerid, COLOR_YELLOW, "Mechanic Central Says: Hello , What's your current position?");
Mobile[playerid] = 123;
}
i have look at wiki and i did find this
Код:
public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);
return 1;
}
is this the right thing to use? i mean SetPlayerCheckpoint(playerid, and DisablePlayerCheckpoint(playerid); when enter it?
and where to put it? do i need a public funktion and forward ?