08.02.2009, 22:56
i made this /cage cmd but i did something wrong, can someone plz fix it!
Код:
if((strcmp(cmdtext, "/cage", true, 5)== 0)) { if(!strlen(cmdtext[6])) { SendClientMessage(playerid, 0xFF0000AA, "Use: /cage [player id] [how high]"); return 1; } new ID = strval(cmdtext[6]); new high = strval(cmdtext[6]); if(IsPlayerConnected(ID)) { new Float:X, Float:Y, Float:Z; GetPlayerPos(ID, X, Y, Z); SetPlayerPos(ID,X,Y,Z +high +2); cage[ID] = CreateObject(985, X, Y+3.5, Z +high, 0.0, 0.0, 0.0); cage2[ID] = CreateObject(985, X+3.5, Y, Z +high, 0.0, 0.0, 90.0); cage3[ID] = CreateObject(985, X-3.5, Y, Z +high, 0.0, 0.0, 270.0); cage4[ID] = CreateObject(985, X, Y-3.5, Z +high, 0.0, 0.0, 180.0); cage5[ID] = CreateObject(985, X, Y +2, Z +high -1.5, 90.0, 0.0, 0.0); cage6[ID] = CreateObject(985, X, Y +2, Z +high +5, 90.0, 0.0, 0.0); caged[ID] = 1; // Use this in a /cage command to prevent being caged twice and causing the cage to be unremovable. PlayerPlaySound(ID, 1137, X, Y, Z); } return 1; }