26.12.2015, 19:22
As the topic says how do i make a specific command for a specific name?
CMD:fix(playerid,params[])
{
#pragma unused params
if(PlayerInfo[playerid][Level] >= 1) {
if (IsPlayerInAnyVehicle(playerid)) {
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid),1250.0);
return SendClientMessage(playerid,blue,"Vehicle Fixed");
} else return SendClientMessage(playerid,red,"Error: You are not in a vehicle");
} else return SendClientMessage(playerid,red,"ERROR: You need to be level 1 to use this command");
}
CMD:fix(playerid,params[]) { #pragma unused params new name[32]; GetPlayerName(playerid, name,32); if(!strcmp(name, "name here", false) { if (IsPlayerInAnyVehicle(playerid)) { RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(GetPlayerVehicleID(playerid),1250.0); return SendClientMessage(playerid,blue,"Vehicle Fixed"); } else return SendClientMessage(playerid,red,"Error: You are not in a vehicle"); } else return SendClientMessage(playerid,red,"ERROR: You need to be level 1 to use this command"); }