07.07.2014, 16:44
i want a command for only admins when they type /rc rc spanwed and they automatically put into it
CMD:rc(playerid,params[])
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new vid = CreateVehicle(564, x,y,z, 0, 0, 1, 60); // RC tank
PutPlayerInVehicle(playerid,vid,0);
return 1;
}
pawn Код:
|
CMD:rc(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0x800000, "ERROR: RC CMD - You are not an admin!");
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new vid = CreateVehicle(564, x,y,z, 0, 0, 1, 60); // RC tank
PutPlayerInVehicle(playerid,vid,0);
return 1;
}
//Here is sscanf tempban. REquires sscanf plugin
cmd:tempban(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0x800000, "ERROR: Tempban - You are not an admin!");
new player, time;
if(sscanf(params, "ud", player, time)) return SendClientClientMessage(playerid, 0x800000, "/tempban <playerid> <params>");
time = time * 60000, mins = time / 60000;
if(time < 60000 || time > 99999999 || mins > 9999) return SendClientClientMessage(playerid, 0x800000, "/tempban <playerid> <params>");
new ipa[18];
GetPlayerIp(playerid, ipa, sizeof(ipa));
BlockIpAddress(ipa, time);
printf("%s (IP: %s) was banned for %d minutes", player, ipa, mins);
return 1;
}