[Help]Making A Command
#1

I Need Help Making A Command So When You Get In A Vehicle It Will Say What I Type It To Say We Could Do It Buy CarID Because I Have A /carid Cmd Here is the /setplate cmd (changing to only use by admin) something so i could like type /setcarenter (thing i wanna type) (carid) you can see the script if needed on tv my msn is cody@worp.info

Код:
if(strcmp(cmd, "/setplate", true) == 0) {
		new playername[MAX_PLAYER_NAME];

    if (GetPlayerMoney(playerid) >= 1000){
		if (strlen(cmdtext) > 10){
		if (IsPlayerConnected(playerid)) {
    if(IsPlayerInAnyVehicle(playerid)) {

 			GetPlayerName(playerid,playername,sizeof(playername));
			format(string, sizeof(string), "(INFO) Vehicle plate changed to %s.",cmdtext[10]);
			SendClientMessage(playerid, COLOR_YELLOW, string);
			format(string, sizeof(string), "This vehicle is now registered to %s.",playername);
			SendClientMessage(playerid, COLOR_GREY, string);
			printf(string);
			SetVehicleNumberPlate(GetPlayerVehicleID(playerid), cmdtext[10]);
			SetVehicleToRespawn(GetPlayerVehicleID(playerid));
			GivePlayerMoney(playerid,-1000);
  			if(dini_Exists("Plates.txt")){
		  	GetPlayerName(playerid,playername,sizeof(playername));
  				dini_Set("Plates.txt",cmdtext[10], playername);
			}

		}else{
			SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle in order to use this command.");
			}
		}
		}else{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setplate [Text (Maximum 8 characters - use ONLY numbers, letters or spaces)]");
			SendClientMessage(playerid, COLOR_GREY, "Please note that not all vehicles are compatible with custom license plates.");
			}
    }else{
			SendClientMessage(playerid, COLOR_RED, "You do not have enough money to alter your license plate.");
			SendClientMessage(playerid, COLOR_GREY, "The cost for this service is $1000.");
			}

		return 1;
	}
Reply
#2

Custom plates do not work in 0.3.
Reply
#3

i know it saves in a text file but i want it done so wen i type in a cmd it sets it up to say something when u eneter that car id
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)