23.10.2012, 22:36
(
Последний раз редактировалось Ouro; 23.10.2012 в 23:11.
)
PHP код:
/******************************************************************************
* *
* Copyright © Fуrum SA-MP *
* *
******************************************************************************/
#include <a_samp>
#define FILTERSCRIPT
#include <zcmd>
#include <sscanf2>
public OnPlayerEnterCheckpoint(playerid)
{
SendClientMessage(playerid, -1, "Vocк chegou em seu destino! (/gps)");
DisablePlayerCheckpoint(playerid);
return 1;
}
stock Nome(playerid)
{
new Name[MAX_PLAYERS];
GetPlayerName(playerid, Name, sizeof(Name));
return Name;
}
CMD:gps(playerid, params[])
{
new String[128], ID, Float:X, Float:Y, Float:Z;
GetPlayerPos(ID, X, Y, Z);
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "Digite: /gps <id>");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "[ERRO] Jogador nгo conectado!");
format(String, sizeof(String), "Foi marcado um checkpoint no jogador: (%d) %s", ID, Nome(ID));
SendClientMessage(playerid, -1, String);
SetPlayerCheckpoint(playerid, X, Y, Z, 5.0);
return 1;
}