21.01.2017, 20:42
Good to make command / degree of my decision to improve and incur other commands to do so it is not working
Код:
Dcmd_grade (playerid, params []) { ****#pragma params not used **** ****New tmp [256], tmp2 [256], idx; Tmp = strtok (params, idx); Tmp2 = strtok (params, idx); *If (! Strlen (tmp)) returns SendClientMessage (playerid, COR_BRANCO, "Usage: / grid [create / remove]"); ****// if (WorkOut [playerid] == 0) returns SendClientMessage (playerid, COR_ERRO, "[ERROR] {FFFFFF} You are not working to use this command!"); ****If [playerid] [pA] = 1 || Player [playerid] [pChoque]> = 1 || Player [playerid] [pAdministrator]> = 1 || Player [playerid] [pBOPE]> = 1 || Player [playerid] [pHelper]> = 30 | Player [playerid] [pReporter]> = 1) { ********If (strcmp (tmp, "create", true) == 0) { If (sscanf (params, "s")) returns SendClientMessage (playerid, COR_BRANCO, "Usage: / grid [create]"); New Float: X, Float: Y, Float: Z, Floating: A; New String [128]; GetPlayerPos (playerid, X, Y, Z); GetPlayerFacingAngle (playerid, A); Player [playerid] [pGrade] ++; Object [playerid] = CreateObject (980, X, Y, Z + 1.7, 0,0, 0,0, A); ********ObjectID [playerid] = Object [playerid]; SetPlayerPos (playerid, X, Y, Z + 5.2); Format (String, sizeof String, "Object ID: [% d]", Object [playerid]); ********If (Player [playerid] [pGrade]> -1) ", Player [playerid] [pGrade], getPName (playerid), CheckOrg (playerid); Else (String, sizeof (String), "Grid created by% s \ n% s."), GetPName (playerid), CheckOrg (playerid); Create3DTextLabel (String, -1, X, Y, Z, 15,0, 0, 0); } Else if (strcmp (tmp, "remove", true) == 0) { If (! Strlen (tmp2)) returns SendClientMessage (playerid, COR_BRANCO, "Usage: / degree remove [all / id]"); If (strcmp (tmp2, "all", true) == 0) { For (new i = 0; i <= MAX_GRADE; i ++) *********{ DestroyObject (Player [i] [Grade]); SendClientMessage (playerid, COR_ERRO, "[ERROR] {FFFFFF} You are not allowed to use this command!"); (I.e. Else if (strcmp (tmp2, "id", true) == 0) { New id, remover; **************If (sscanf (params, "i", id)) returns SendClientMessage (playerid, COR_BRANCO, "Usage: / degree remove [id]"); **************SendClientMessage (playerid, -1, "Press {C0C0C0} SHIFT {FFFFFF} to move a camera."); **************DestroyObject (Player [id] [pGrade]); **************SendClientMessage (playerid, -1, "Press {C0C0C0} SHIFT {FFFFFF} to move a camera."); ******** **************Return true; } }other{ SendClientMessage (playerid, COR_BRANCO, "Usage: / degree [create / remove]"); Return 1; } } Else SendClientMessage (playerid, COR_ERRO, "[ERROR] {FFFFFF} You are not allowed to use this command!"); Return 1; }