12.06.2014, 17:14
I think the easiest way is to just use strcmp for that, here's an example of one I made:
pawn Код:
CMD:key(pid, arg[])
{
if(IsPlayerInAnyVehicle(pid))
{
new vehicleid = GetPlayerVehicleID(pid);
new choice[5], engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(sscanf(arg, "s[5]", choice)) return SendMessage(pid, 2, "/key [off][on][acc]");
if(!strcmp(choice, "off"))
{