CMD:drag(playerid,params[]) { if(gTeam[playerid] == Swat) { new id, Float:x,Float:y,Float:z,tname[MAX_PLAYER_NAME]; if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1,"{ff0000}[USAGE]: {ffffff}/drag [ID]"); if(GetPlayerWantedLevel(id) >= 4) { if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"{ff0000}[ERROR]: {ffffff}This player isn't online!"); if(playerid == id) return SendClientMessage(playerid, -1, "{ff0000}[ERROR]: {ffffff}You can't drag your self"); if(!IsPlayerAttachedObjectSlotUsed(id, 0)) return SendClientMessage(playerid,RED,"{ff0000}[ERROR]: {ffffff}The player must be cuffed to use this command on him."); GetPlayerPos(playerid, x, y, z); if(IsPlayerInRangeOfPoint(id, 5.0, x, y, z)) { if(IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid, RED,"{ff0000}[ERROR]: {ffffff}This player is in vehicle, Try to get him out, then re-use the command."); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED,"{ff0000}[ERROR]: {ffffff}You must be in a vehcile to use this command."); PutPlayerInVehicle(id, GetPlayerVehicleID(playerid), 1); TogglePlayerControllable(id, 0); GetPlayerName(id,tname,sizeof(tname)); format(Jstring,sizeof(Jstring)," {00FFFFFF}[SWAT COMMAND]:{ffffff} You have dragged the player: %s(%d) succesfully, take him to the check point.",tname,id); SendClientMessage(playerid,SwatC,Jstring); } } else return SendClientMessage(playerid,-1,"{ff0000}[ERROR]: {ffffff}This player isn't wanted."); } else return SendClientMessage(playerid, RED,"{ff0000}[ERROR]: {ffffff}You have to be in the S.W.A.T skin to use this command."); return 1; }
If you're going to call people out on what they should and shouldn't post, then you shouldn't be pasting up code to those who aren't learning, or even trying to follow the rules, or the forum guidelines..
|
i didn`t paste any code,i just wrote it rofl.and may i ask what was wrong about it?I just told him how to get the last cars id
|
You've pasted up code... You're encouraging people to come here demanding people to write code for them and to ignore what the more experienced of us, recommend.
You're encouraging this place to continue divulging into a copy-paste hell. Feeding people this, will ONLY result in UNGRATEFUL ABUSIVE people when they don't get what they demand. This is why the forum requires you to post up code, and to actually attempt to do things rather than expecting people to post up code to 'help' when it does nothing in the slightest to teach them anything, except for how to con people into giving you what you want when others say it's not what this forum is actually for. |