[HELPING] System neon by mechanic
#1

Hello all,
--> Sorry for my english i'm french .

Today for my server, I got the idea to create a neon system , I told myself to be more realistic if it was done by a mechanic. So I have found a nice FS, but unfortunately, in the FilterScript, we must control or own (/makeneon...), but here I wish that were the mechanics who offers the player to install neon like or that color, I can not get the mix of both with a control mechanic like /neon. Before I get into anything, I'd like your help.
The neon FS : http://www.mediafire.com/?ocuq1tr3eud81bp
So I create a command /neon :

Код:
if(strcmp(cmd, "/neon", true) == 0
	{
		if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pJob] != 7)
			{
				SendClientMessage(playerid, COLOR_GREY, "Vous n'кtes pas mйcanicien");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE : /neon [playerid/nom] [couleur] [prix]
				return 1;
It's here where i'm very don't sure :
Код:
new playa;
	         	new money;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			money = strval(tmp);
			if(money < 1 || money > 99999) { SendClientMessage(playerid, COLOR_GREY, "Le prix du nйon doit кtre compris entre 1$ et 99999$."); return 1; }
			if(IsPlayerConnected(playa))
And i fisish :
Код:
	{
			    if(playa != INVALID_PLAYER_ID)
			    {
			       /* if (PlayerToPoint(30, playerid,1644.0358,2198.2336,10.8203))//centerpoint 24-7
					{*/
				        if(ProxDetectorS(8.0, playerid, playa)&& IsPlayerInAnyVehicle(playa))
						{
						    if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, "   Tu ne peux pas te mettre un nйon а toi mкme"); return 1; }
					    	GetPlayerName(playa, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
						    format(string, sizeof(string), "Vous offrez а %s de mettre un nйon sur son vйhicule pour $%d .",giveplayer,money);
							SendClientMessage(playerid, COLOR_WHITE, string);
							format(string, sizeof(string), "Le Mйcanicien %s vous propose de mettre un nйon sur votre vйhicule pour $%d, (tappez /accepter neon) pour accepter.",sendername,money);
							SendClientMessage(playa, COLOR_WHITE, string);
							RepairOffer[playa] = playerid;
							RepairPrice[playa] = money;
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "Ce joueur n'est pas prиs de vous/ il n'est pas dans une voiture.");
						}
					/*}
					else
					{
                        SendClientMessage(playerid, COLOR_RED, "Tu n'est pas au garage pour mettre un nйon");
					}*/
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "Ce joueur n'est pas connectй.");
			}
		}
		return 1;
	}
Thanks for you help. ++
Reply
#2

little up
Reply
#3

Quote:
Originally Posted by Cedlu43
Посмотреть сообщение
little up
please
Reply
#4

I could maybe help you if you used sscanf
Reply
#5

Код:
I could maybe help you if you used sscanf
yes
Reply
#6

Up
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)