Help with command. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with command. (
/showthread.php?tid=390917)
Help with command. -
Mustafa6155 - 08.11.2012
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?
Re: Help with command. -
Alex Magaсa - 08.11.2012
use zeex (include)(zcmd)
PHP код:
#include <zcmd>
CMD:searchcar(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] >= 2) {
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "--------------------------------------------------------------------------------------------------------------------------------");
SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle Search:");
new
string[128];
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "No keyword specified.");
if(!params[2]) return SendClientMessageEx(playerid, COLOR_GREY, "Search keyword too short.");
for(new v; v < sizeof(VehicleName); v++) {
if(strfind(VehicleName[v], params, true) != -1) {
if(isnull(string)) format(string, sizeof(string), "%s (ID %d)", VehicleName[v], v+400);
else format(string, sizeof(string), "%s | %s (ID %d)", string, VehicleName[v], v+400);
}
}
if(!string[0]) SendClientMessageEx(playerid, COLOR_GREY, "No results found.");
else if(string[127]) SendClientMessageEx(playerid, COLOR_GREY, "Too many results found.");
else SendClientMessageEx(playerid, COLOR_WHITE, string);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "--------------------------------------------------------------------------------------------------------------------------------");
}
return 1;
}
Re: Help with command. -
Mustafa6155 - 08.11.2012
Its not for the admins for every body and if he enter an polcie car is difrend and he enter an race car difrend
Re: Help with command. -
Alex Magaсa - 08.11.2012
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?
Re: Help with command. -
Mustafa6155 - 09.11.2012
yea i mean he enter an Gangsta vehicle he do /searchcar he get other things in other cars??