How to remove lesson , car license
#1

Hi , I need help , I just need to know how to remove this :

if(TakingLesson[playerid] == 0) { }
else {
SendClientMessage(playerid, COLOR_GREY, " You don't know how to Drive yet, so you left the Car !");
}

I do not want lesson ,

And...

How i create /givelicenses , for admin ? , i looked on any servers , thanks
Reply
#2

Well, just delete it.
Reply
#3

Код:
//------------------------------------------------[Admin Give License]-------------------------------------
	if(strcmp(cmd, "/agivelicense", true) == 0 || strcmp(cmd, "/agl", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if (PlayerInfo[playerid][pAdmin] >= 1332)
	    {
	      new x_nr[256];
				x_nr = strtok(cmdtext, idx);
				if(!strlen(x_nr)) {
				  SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agivelicense [name] [playerid/PartOfName]");
				  SendClientMessage(playerid, COLOR_WHITE, "Available names: Driving, Pilots, Sailing, Fishing, Weapon.");
					return 1;
				}
			  if(strcmp(x_nr,"driving",true) == 0)
				{
		      tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
					  SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agivelicense driverslicense [playerid/PartOfName]");
					  return 1;
					}
					giveplayerid = ReturnUser(tmp);
					if(IsPlayerConnected(giveplayerid))
					{
					  if(giveplayerid != INVALID_PLAYER_ID)
					  {
					    GetPlayerName(playerid, sendername, sizeof(sendername));
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				      format(string, sizeof(string), "* You've given a Drivers License to %s.",giveplayer);
					    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					    format(string, sizeof(string), "* Admin %s has given you a Drivers License.",sendername);
					    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
					    PlayerInfo[giveplayerid][pCarLic] = 1;
					    return 1;
				    }
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "  That player is Offline!");
					  return 1;
					}
				}
				else if(strcmp(x_nr,"Pilots",true) == 0)
				{
		      tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
					  SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agivelicense Pilotslicense [playerid/PartOfName]");
					  return 1;
					}
					giveplayerid = ReturnUser(tmp);
					if(IsPlayerConnected(giveplayerid))
					{
					  if(giveplayerid != INVALID_PLAYER_ID)
					  {
					    GetPlayerName(playerid, sendername, sizeof(sendername));
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				      format(string, sizeof(string), "* You've given a Pilots License to %s.",giveplayer);
					    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					    format(string, sizeof(string), "* Admin has given you a Pilots License.",sendername);
					    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
					    PlayerInfo[giveplayerid][pFlyLic] = 1;
					    return 1;
						}
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "  That player is Offline!");
					  return 1;
					}
				}
				else if(strcmp(x_nr,"sailing",true) == 0)
				{
		      tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
					  SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agivelicense sailinglicense [playerid/PartOfName]");
					  return 1;
					}
					giveplayerid = ReturnUser(tmp);
					if(IsPlayerConnected(giveplayerid))
					{
					  if(giveplayerid != INVALID_PLAYER_ID)
					  {
					    GetPlayerName(playerid, sendername, sizeof(sendername));
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				      format(string, sizeof(string), "* You've given a Sailing License to %s.",giveplayer);
					    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					    format(string, sizeof(string), "* Admin has given you a Sailing License.",sendername);
					    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
					    PlayerInfo[giveplayerid][pBoatLic] = 1;
					    return 1;
						}
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "  That player is Offline!");
					  return 1;
					}
				}
				else if(strcmp(x_nr,"fishing",true) == 0)
				{
		      tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
					  SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agivelicense fishinglicense [playerid/PartOfName]");
					  return 1;
					}
					giveplayerid = ReturnUser(tmp);
					if(IsPlayerConnected(giveplayerid))
					{
					  if(giveplayerid != INVALID_PLAYER_ID)
					  {
					    GetPlayerName(playerid, sendername, sizeof(sendername));
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				      format(string, sizeof(string), "* You've given a Fishing License to %s.",giveplayer);
					    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					    format(string, sizeof(string), "* Admin has given you a Fishing License.",sendername);
					    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
					    PlayerInfo[giveplayerid][pFishLic] = 1;
					    return 1;
						}
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "  That player is Offline!");
					  return 1;
					}
				}
				else if(strcmp(x_nr,"weapon",true) == 0)
				{
		      tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
					  SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agivelicense weaponlicense [playerid/PartOfName]");
					  return 1;
					}
					giveplayerid = ReturnUser(tmp);
					if(IsPlayerConnected(giveplayerid))
					{
					  if(giveplayerid != INVALID_PLAYER_ID)
					  {
					    GetPlayerName(playerid, sendername, sizeof(sendername));
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				      format(string, sizeof(string), "* You've given a Weapon License to %s.",giveplayer);
					    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					    format(string, sizeof(string), "* Admin has given you a Weapon License.",sendername);
					    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
					    PlayerInfo[giveplayerid][pGunLic] = 1;
					    return 1;
						}
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "  That player is Offline!");
					  return 1;
					}
				}
	    }
	    else
	    {
	      SendClientMessage(playerid, COLOR_GREY, "  You are not authorised to use this command!");
	      return 1;
	    }
	  }
	  return 1;
 	}
but if want to player spawn with driver license is only go onplayerconnect
and find " PlayerInfo[playerid][pCarLic] = 0; "
just change to " PlayerInfo[playerid][pCarLic] = 1; "

more help, just say
Reply
#4

Thanks , Thanks , Thanks, it works
Reply
#5

I got any errors with admin give license , other it works.

Код:
C:\Users\C_Walk\Desktop\Untitled.pwn(2) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(4) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(6) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(9) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(10) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(12) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(13) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(15) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(18) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(21) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(24) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(26) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(28) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(28) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(28 -- 29) : error 010: invalid function or declaration
C:\Users\C_Walk\Desktop\Untitled.pwn(28 -- 29) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


16 Errors.
Reply
#6

you must paste in your script, not in a new script. copy and paste near of /givelicense
Reply
#7

Now work with : an warning: C:\Users\C_Walk\Desktop\GF Server\gamemodes\gf.pwn(1726 : warning 217: loose indentation

but when i write not have anything.
Reply
#8

that warning is not harmful
Reply
#9

Quote:
Originally Posted by valentinorossi16
Now work with : an warning: C:\Users\C_Walk\Desktop\GF Server\gamemodes\gf.pwn(1726 : warning 217: loose indentation
Don't ignore it, just indent your code.
Reply
#10

send the line where give you warn
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)