14.01.2011, 13:42
I want to convert this to strcmd or what it is called. This is a zcmd code.
Quote:
COMMAND:dropoff(playerid, params[]) { new otherplayerid; if(sscanf(params, "d", otherplayerid)) return SendClientMessage(playerid, 0xFFFFFF,"Usage /dropoff [ID]"); if(!IsPlayerConnected(otherplayerid)) return SendClientMessage(playerid, 0xFFFFFF, "This player is not connected."); if(IsPlayerInRangeOfPoint(playerid, 3.00,1698.6003,68.8721,29.3053)) return SendClientMessage(playerid, 0xFFFFFF,"You need to be near the cages to unload."); if(IsPlayerInRangeOfPoint(otherplayerid, 3.00, 1698.6003, 68.8721, 29.3053)) return SendClientMessage(playerid, 0xFFFFF,"This player is not in range of the cage zone."); { if(PlayerInfo[playerid][pJob] == 1) return SendClientMessage(playerid, 0xFFFFFF,"You're not a mercenary"); { if(PlayerTied[otherplayerid] > 0) return SendClientMessage(playerid, 0xFFFFFF,"This player is not tied."); { new rand = random(sizeof(CageSpawns)); SetPlayerPos(otherplayerid, CageSpawns[rand][0], CageSpawns[rand][1],CageSpawns[rand][2]); SetPlayerFacingAngle(otherplayerid, CageSpawns[rand][3]); } } } return 1; } |