dcmd_sendtopd(playerid, params[])
{
new targetid, pName[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
if(sscanf(params, "u", pName)) return SendClientMessage(playerid, COLOR_RED, "/sendtopd [playerid]");
else if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You have no access to this command");
else if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREEN, "Player Not Found");
else
{
SetPlayerPos(targetid, 1517.1479,-1619.2880,15.0087);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You transfered %u to Police Departament");
}
return 1;
}
dcmd_sendtopd(playerid, params[])
{
new targetid, pName[MAX_PLAYER_NAME];
if(sscanf(params, "i", targetid)) return SendClientMessage(playerid, COLOR_RED, "/sendtopd [playerid]");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You have no access to this command");
if(targetid == INVALID_PLAYER_ID || !IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREEN, "Player Not Found");
else
{
GetPlayerName(targetid, pName, MAX_PLAYER_NAME);
SetPlayerPos(targetid, 1517.1479,-1619.2880,15.0087);
new msg[128];
format(msg, 128, "You transfered %s (ID: %i) to Police Departament", pName, targetid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, msg);
}
return 1;
}
Umm... not completely working. Anyways, how about the other cmds?!
|
dcmd_sendtopd(playerid, params[])
{
new targetid, pName[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
if(sscanf(params, "u", pName)) return SendClientMessage(playerid, COLOR_RED, "/sendtopd [playerid]");
else if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You have no access to this command");
else if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREEN, "Player Not Found");
else
{
GetPlayerName(targetid, pName, MAX_PLAYER_NAME);
SetPlayerPos(targetid, 1517.1479,-1619.2880,15.0087);
format(msg, 128, "You transfered %s (ID: %d) to Police Departament", pName, targetid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, msg);
}
return 1;
}