18.05.2017, 02:30
why you made so long command it can be done simple as that
PHP код:
CMD:drag(playerid, params[])
{
new name[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], id, sttr[100];
if(!IsPlayerConnected(id)) return SCM(playerid, 0xFF0000FF, "Error: Inactive userid!");
if(PINFO[playerid][pAdmin] <= 0) return SCM(playerid,COLOR_ERROR,"Error: Your admin level isn't high enough to use this command");
if(sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_YELLOW, "Syntax: /drag <PlayerID>");
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_ERROR,"You are not in a vehicle.");
new newcar = GetPlayerVehicleID(playerid);
PutPlayerInVehicle(id,newcar,1);
GetPlayerName(id, name,sizeof(name));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(sttr,sizeof(sttr),"Admin %s drags you to his/her vehicle.",sendername);
SCM(id, COLOR_AdminWarn, sttr);
SCM(playerid,COLOR_ERROR,"Dragged.");
return 1;
}