Help with command.
#1

this is my command
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/searchcar", true))
    {
            new vehicleid = GetPlayerVehicleID(playerid);
   			if(GetVehicleModel(vehicleid) == 523 && GetVehicleModel(vehicleid) == 427 && GetVehicleModel(vehicleid) == 490 && GetVehicleModel(vehicleid) == 528 && GetVehicleModel(vehicleid) == 596 && GetVehicleModel(vehicleid) == 597 && GetVehicleModel(vehicleid) == 598 && GetVehicleModel(vehicleid) == 599 && GetVehicleModel(vehicleid) == 601)
  			SendClientMessage(playerid, -1, "Searched an car found something??");
  			GivePlayerWeapon(playerid, PossibleRandomWeapons[r][0], PossibleRandomWeapons[r][1]);
  			return 1;
Not tested but how make agait that command but then
Код:
With other cars and other thing ?? ik he need to return to that command please help but i dont now how to do?
Reply
#2

use zeex (include)(zcmd)
PHP код:
#include <zcmd>
CMD:searchcar(playeridparams[]) {

    if(
PlayerInfo[playerid][pAdmin] >= 2) {

        
SendClientMessageEx(playeridCOLOR_LIGHTBLUE"--------------------------------------------------------------------------------------------------------------------------------");
        
SendClientMessageEx(playeridCOLOR_WHITE"Vehicle Search:");

        new
            
string[128];

        if(
isnull(params)) return SendClientMessageEx(playeridCOLOR_GREY"No keyword specified.");
        if(!
params[2]) return SendClientMessageEx(playeridCOLOR_GREY"Search keyword too short.");

        for(new 
vsizeof(VehicleName); v++) {
            if(
strfind(VehicleName[v], paramstrue) != -1) {

                if(
isnull(string)) format(stringsizeof(string), "%s (ID %d)"VehicleName[v], v+400);
                else 
format(stringsizeof(string), "%s | %s (ID %d)"stringVehicleName[v], v+400);
            }
        }

        if(!
string[0]) SendClientMessageEx(playeridCOLOR_GREY"No results found.");
        else if(
string[127]) SendClientMessageEx(playeridCOLOR_GREY"Too many results found.");
        else 
SendClientMessageEx(playeridCOLOR_WHITEstring);

        
SendClientMessageEx(playeridCOLOR_LIGHTBLUE"--------------------------------------------------------------------------------------------------------------------------------");
    }
    return 
1;

Reply
#3

Its not for the admins for every body and if he enter an polcie car is difrend and he enter an race car difrend
Reply
#4

well just change pAdmin im using this in some of my scripts to find the vehicle.!
Well i don't really understand what you said here:
If he enter a police car is diffirent and if he enter an race car is diffirent? what you mean?
Reply
#5

yea i mean he enter an Gangsta vehicle he do /searchcar he get other things in other cars??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)