CMD kil
#1

hello i making cmd kill but i get one error and this command dont work best in game
Код:
CMD:kill(playerid, params[])
{
if(IsPlayerAdmin(playerid == 1)) return SendClientMessage(playerid, 0x33AA33AA, " [BA:RP]Koristi /kill [playerid]");
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0x33AA33AA, " [BA:RP]Igrac koga pokusavate ubiti nije online!");
if (sscanf(params, targetid, "ui", SetPlayerHealth)) return SendClientMessage(playerid, 0x33AA33AA, "[BA:RP] Ubijen si od strane admina!");

else if
(IsPlayerAdmin(playerid == 0)) return SendClientMessage (playerid, 0x33AA33AA, "[BA:RP]Niste ovlasceni da koristite ovu komandu!");

return 1;
}
errors
Код:
error 017: undefined symbol "targetid"
Reply
#2

You have to create it first so you can use it.
Reply
#3

bro can you help me with target id
Reply
#4

Quote:
Originally Posted by IceWizz
Посмотреть сообщение
bro can you help me with target id
I already did help you. I told you what's wrong.
Reply
#5

to type new targetid ?
Reply
#6

Quote:
Originally Posted by IceWizz
Посмотреть сообщение
to type new targetid ?
Try it.
Reply
#7

error
Код:
syntax error in the expression, or invalid function call
script
Код:
CMD:kill(playerid, params[])
{
if(IsPlayerAdmin(playerid == 1)) return SendClientMessage(playerid, 0x33AA33AA, " [BA:RP]Koristi /kill [playerid]");
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0x33AA33AA, " [BA:RP]Igrac koga pokusavate ubiti nije online!");
if (sscanf(params, "ui", SetPlayerHealth)) return SendClientMessage(playerid, 0x33AA33AA, "[BA:RP] Ubijen si od strane admina!");

else if
(IsPlayerAdmin(playerid == 0)) return SendClientMessage (playerid, 0x33AA33AA, "[BA:RP]Niste ovlasceni da koristite ovu komandu!");

return 1;
}
Reply
#8

And where did you create targetid?
Reply
#9

new code
Код:
CMD:kill(playerid, params[])
{
if(IsPlayerAdmin(playerid == 1)) return SendClientMessage(playerid, 0x33AA33AA, " [BA:RP]Koristi /kill [playerid]");
{
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0x33AA33AA, " [BA:RP]Igrac koga pokusavate ubiti nije online!");
{
 if(sscanf(params, "ui", SetPlayerHealth)) return SendClientMessage(playerid, 0x33AA33AA, "[BA:RP] Ubijen si od strane admina!");
  SetPlayerHealth(playerid, 0.0);
 if(IsPlayerAdmin(playerid == 0)) return SendClientMessage (playerid, 0x33AA33AA, "[BA:RP]Niste ovlasceni da koristite ovu komandu!");

}
}
return 1;
}
errors
Код:
syntax error in the expression, or invalid function call
Reply
#10

Код:
CMD:kill(playerid, params[])
{
 new targetid;
  {
   if(IsPlayerAdmin(playerid == 1)) return SendClientMessage(playerid, 0x33AA33AA, " [BA:RP]Koristi /kill [playerid]");
      {
         if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0x33AA33AA, " [BA:RP]Igrac koga pokusavate ubiti nije online!");
            {
                if(sscanf(params,  "ui", targetid, SetPlayerHealth)) return SendClientMessage(playerid, 0x33AA33AA, "[BA:RP] Ubijen si od strane admina!");
                    SetPlayerHealth(playerid, 0.0);
         if(IsPlayerAdmin(playerid == 0)) return SendClientMessage (playerid, 0x33AA33AA, "[BA:RP]Niste ovlasceni da koristite ovu komandu!");
          }
      }
  return 1;
  }
}
new code
errors again syntax error
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)