Depressive_ Posted June 25, 2018 Posted June 25, 2018 Salut,iar eu :)) Ma puteti ajuta cu comanda /crash? gen vreau sa fie [CMD:crash(playerid, params[]) etc ] :) Multumesc anticipat! if(strcmp(cmd, "/crash", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "SYNTAX: /crash [playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); if (PlayerInfo[playerid][pAdmin] >= 5) { if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(giveplayerid != playerid && Untouchable[giveplayerid]) return SendClientMessage(playerid, COLOR_GREY, "* You Can't Do this on This player!"); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6); format(string, sizeof(string), "You have crashed %s (%d)'s game", giveplayer,giveplayerid); SendClientMessage(playerid,COLOR_DBLUE, string); return 1; } else { format(string, sizeof(string), "** Not Authorised!", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } } else { format(string, sizeof(string), "** You are not Authorised to Use this Command!", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; } Quote
Un4m3d_Hokage Posted June 27, 2018 Posted June 27, 2018 (edited) CMD:crash(playerid, params[]) { new giveplayerid, giveplayer[25]; if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, -1, "Synthax: /crash [playerid/part of his name]"); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); if (PlayerInfo[playerid][pAdmin] >= 5) { if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(giveplayerid != playerid && Untouchable[giveplayerid]) return SendClientMessage(playerid, COLOR_GREY, "* You Can't Do this on This player!"); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6); format(string, sizeof(string), "You have crashed %s (%d)'s game", giveplayer,giveplayerid); SendClientMessage(playerid,COLOR_DBLUE, string); return 1; } else { format(string, sizeof(string), "** Not Authorised!", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } } else { format(string, sizeof(string), "** You are not Authorised to Use this Command!", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } return 1; } Sa stii ca e o mare prostie ce ai tu in comanda asta, folosesti format pentru un mesaj pentru care nu ai nevoie sa folosesti, ai 15 linii in plus, uite asa trebuia sa arate comanda: CMD:crash(playerid, params[]) { new giveplayerid, giveplayer[25]; if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, -1, "Synthax: /crash [playerid/part of his name]"); { if (PlayerInfo[playerid][pAdmin] >= 5) else return SendClientMessage(playerid, COLOR_GRAD1, "** You are not Authorised to Use this Command!"); if(giveplayerid != INVALID_PLAYER_ID) else return SendClientMessage(playerid, COLOR_GRAD1, "** Not Authorised!"); if(giveplayerid != playerid && Untouchable[giveplayerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "* You Can't Do this on This player!"); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5); GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6); format(string, sizeof(string), "You have crashed %s (%d)'s game", giveplayer,giveplayerid); SendClientMessage(playerid,COLOR_DBLUE, string); } return 1; } Edited June 27, 2018 by Un4m3d_Hokage Quote
Depressive_ Posted June 28, 2018 Author Posted June 28, 2018 Sa stii ca e o mare prostie ce ai tu in comanda asta, folosesti format pentru un mesaj pentru care nu ai nevoie sa folosesti, ai 15 linii in plus, uite asa trebuia sa arate comanda: Da,stiam asta,doar ca am luat-o ca model de pe un alt site,era cam nasoala :) Quote
NoCodAdv Posted March 22, 2021 Posted March 22, 2021 D:\gamemode\gamemodes\rpg.pwn(18246) : error 001: expected token: ";", but found "]" D:\gamemode\gamemodes\rpg.pwn(18246) : error 029: invalid expression, assumed zero D:\gamemode\gamemodes\rpg.pwn(18246) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 4 Errors. [Finished in 40.0s with exit code 1] [cmd: ['pawncc.exe', '-i includes', 'D:\\gamemode\\gamemodes\\rpg.pwn', '-;+']] [dir: D:\gamemode\gamemodes] [path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH\;C:\Users\gagiu\AppData\Local\Microsoft\WindowsApps;] Quote
Kareito Posted March 26, 2021 Posted March 26, 2021 On 3/22/2021 at 2:46 AM, NoCodAdv said: D:\gamemode\gamemodes\rpg.pwn(18246) : error 001: expected token: ";", but found "]" D:\gamemode\gamemodes\rpg.pwn(18246) : error 029: invalid expression, assumed zero D:\gamemode\gamemodes\rpg.pwn(18246) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 4 Errors. [Finished in 40.0s with exit code 1] [cmd: ['pawncc.exe', '-i includes', 'D:\\gamemode\\gamemodes\\rpg.pwn', '-;+']] [dir: D:\gamemode\gamemodes] [path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH\;C:\Users\gagiu\AppData\Local\Microsoft\WindowsApps;] linii? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.