need some help
#1

all know this
Code:
AdminLvl[playerid] = 0;
i want to us it by command like
Code:
    if (!strcmp("/blabal", cmdtext))


        {
        SendClientMessage(playerid, 0xFFFFFFFF, "test");
        SendClientMessage(playerid, 0xFFFFFFFF, "test");
        }
        return 1;
i want use i
Code:
AdminLvl[playerid] = 0;
in this and set it to 1 when he use command frist time and send message when he use command again and AdminLvl[playerid] = 0; seted to 1 how this
Reply
#2

I dont understand your post completely, but do you want to do something like this?

Code:
if (!strcmp("/admin", cmdtext))
{
      if (AdminLvl[playerid])
      {
           AdminLvl[playerid] = 0;
           SendClientMessage(playerid, 0xFFFFFFFF, "You are not an admin anymore");
      }
      else
       {
            AdminLvl[playerid] = 1;
            SendClientMessage(playerid, 0xFFFFFFFF, "You are an admin now");
       }
      return 1;
}
Reply
#3

you know line AdminLvl[playerid] = 0;
i want change 0 to 1
Reply
#4

i do this command
Code:
    if (!strcmp("/repair", cmdtext))
    {

        {
        if(command== 0)
        {
        RepairVehicle(GetPlayerVehicleID(playerid));
        SendClientMessage(playerid, 0xFFFFFFFF, "You repaired your vehicle");
        }
        if(command== 1)
		{
		SendClientMessage(playerid,0xF5260FFF,"You already uses this command in this round");
		}
        }
and need under line SendClientMessage(playerid, 0xFFFFFFFF, "You repaired your vehicle"); set command 0 to command 1
Reply
#5

Code:
//on the top of your script
new command[MAX_PLAYERS];

//on OnPlayerCommandText
if (!strcmp("/repair", cmdtext))
    {

        {
        if(command[playerid] == 0)
        {
        RepairVehicle(GetPlayerVehicleID(playerid));
        SendClientMessage(playerid, 0xFFFFFFFF, "You repaired your vehicle");
        command[playerid] = 1;
        }
        if(command[playerid] == 1)
		{
		SendClientMessage(playerid,0xF5260FFF,"You already uses this command in this round");
		}
        }
Reply
#6

E:\www.mini-ex-missions.tk\sumo.pwn(96) : error 028: invalid subscript (not an array or too many subscripts): "command"
E:\www.mini-ex-missions.tk\sumo.pwn(96) : warning 215: expression has no effect
E:\www.mini-ex-missions.tk\sumo.pwn(96) : error 001: expected token: ";", but found "]"
E:\www.mini-ex-missions.tk\sumo.pwn(96) : error 029: invalid expression, assumed zero
E:\www.mini-ex-missions.tk\sumo.pwn(96) : fatal error 107: too many error messages on one line
Reply
#7

pawn Code:
new command[MAX_PLAYERS];


if (!strcmp("/repair", cmdtext))
{
    if(command[playerid] == 1)  return SendClientMessage(playerid,0xF5260FFF,"You already uses this command in this round");
    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid, 0xFFFFFFFF, "You repaired your vehicle");
    command[playerid] = 1;
    return 1;
}
Reply
#8

oh repaired i get the error its new command[MAX_PLAYERS];
Reply
#9

how i repair this Warnings
Code:
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(80) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(84) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(86) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(117) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(117) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(225) : warning 202: number of arguments does not match definition
E:\www.mini-ex-missions.tk\gamemodes\sumo.pwn(292) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Warnings.
lines
Code:
	new plname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, plname, sizeof(plname));
	SetPlayerName(playerid,"%s_servers",plname);
    SendClientMessage(playerid,0x33FF33AA,"[Server] If You want to make a map please visit %s",ForumName);
    SendClientMessageToAll(0xAFAFAFAA,"[Server] Player %s Has joined the game",plname);
RemovePlayerFromGame();
	SendClientMessageToAll(0x33CCFFAA,"[Server] Player %s Has Left The server", name);
	GameTextForAll("%s has won the round! Next round will be starting in 10 seconds.",5000,50, name);
Reply
#10

Use "format" find it on the wiki
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)