Command doesn't work
#1

pawn Код:
CMD:bomb(playerid, params[])
{
    new target;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
    if(sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "USAGE: /pdropbomb (playerid/name)");
    if(target == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Player not connected.");
    else
    {
    GetPlayerPos(target, Pos[0], Pos[1], Pos[2]);
    missile = CreateObject(OBJECT, Pos[0], Pos[1]+2, Pos[2]+200, 0, 0, 1000, 1000);
    SetTimerEx("move", 100, 1, "d", target);
    SetObjectRot(missile, 0, 0, 1000);
    SendClientMessage(playerid, -1, "Done!");
    GameTextForAll("There is a missile headed~n~one of you's way. ~r~Beware.", 5000, 5);
    SetTimerEx("explode", 100, 1, "d", playerid);
    SetTimerEx("play",1000, 0, "d", playerid);
    ismon = true;
    }
    return 1;
}
here is my command but when i go to server and type /bomb and the msg said:
pawn Код:
SERVER: UNKNOW THAT COMMAND
Reply
#2

you logged in as RCON admin ?

OR Try this

PHP код:
CMD:bomb(playeridparams[])
{
    new 
target;
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"SERVER: Unknown command.");
    if(
sscanf(params"u"target)) return SendClientMessage(playerid, -1"USAGE: /pdropbomb (playerid/name)");
    if(
target == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1"Player not connected.");
    
GetPlayerPos(targetPos[0], Pos[1], Pos[2]);
    
missile CreateObject(OBJECTPos[0], Pos[1]+2Pos[2]+2000010001000);
    
SetTimerEx("move"1001"d"target);
    
SetObjectRot(missile001000);
    
SendClientMessage(playerid, -1"Done!");
    
GameTextForAll("There is a missile headed~n~one of you's way. ~r~Beware."50005);
    
SetTimerEx("explode"1001"d"playerid);
    
SetTimerEx("play",10000"d"playerid);
    
ismon true;
    return 
1;

Reply
#3

need to be root rcon
Reply
#4

Read it wrong, silly me. Make sure you're logged in as rcon admin. Type /rcon login [password] which is stated in your server.cfg file.
Reply
#5

Sorry I'm forgot to see the sendclientmessage thanks guys I love u signature Parka
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)