05.11.2013, 15:28
I don't understand why is that when I do /creategang then I typed the name after I enter it shows
but im sure I use the correct parameter for character its c
I did it correctly /creategang BULLDOG
Код:
ERROR [Usage]: /creategang [gangname]
I did it correctly /creategang BULLDOG
Код:
CMD:creategang(playerid,params[]) { if(sscanf(params,"c",params))return ShowPlayerDialog(playerid,ERROR_DIALOG+1,DIALOG_STYLE_MSGBOX,"ERROR!","{FFFFFF}[Usage]:- {EA0000}/creategang [gangname]","Ok",""); if(PlayerDat[playerid][InGang] == 1)return SendClientMessage(playerid,White,"[ERROR]:- {EA0000}You Are Already In A Gang"); if(GetPlayerScore(playerid) < GANG_SCORE_NEEDED) return SendClientMessage(playerid,White,"[ERROR]:- {EA0000}You Need 2000 Score for creating a gang!"); if(GetPlayerMoney(playerid) < GANG_MONEY_NEEDED)return SendClientMessage(playerid,White,"[ERROR]:- {EA0000}You Need $2,000,000 Score for creating a gang!"); if(dini_Exists(gFile(params)))return SendClientMessage(playerid,White,"[ERROR]:- {EA0000}This Gang Name Has Already Been Taken!"); new Gangid = random(2000); dini_Create(gFile(params)); dini_Set(gFile(params),"GangOwner",pName(playerid)); dini_Set(gFile(params),"GangAdmin_1",pName(playerid)); dini_Set(gFile(params),"GangAdmin_2",INVALID_GANG_ADMIN); dini_Set(gFile(params),"GangAdmin_3",INVALID_GANG_ADMIN); dini_Set(gFile(params),"GangAdmin_4",INVALID_GANG_ADMIN); dini_IntSet(gFile(params),"GangID",Gangid); dini_Create(gFileId(Gangid)); dini_Set(gFileId(Gangid),"GangName",params); dini_IntSet(gFileId(Gangid),"Kills",0); dini_IntSet(gFileId(Gangid),"Deaths",0); dini_IntSet(gFileId(Gangid),"GangHasABase",0); dini_FloatSet(gFileId(Gangid),"Base_X",0.0); dini_FloatSet(gFileId(Gangid),"Base_Y",0.0); dini_FloatSet(gFileId(Gangid),"Base_Z",0.0); dini_FloatSet(gFileId(Gangid),"Base_Angle",0.0); dini_IntSet(gFileId(Gangid),"GangCash",0); /*============================================================================== Setting The Players Gang ==============================================================================*/ dini_Set(pFile(playerid),"GangName",params); dini_IntSet(pFile(playerid),"GangID",Gangid); dini_IntSet(pFile(playerid),"InAGang",1); GivePlayerMoney(playerid,-GANG_MONEY_NEEDED); new string[256]; format(string,sizeof(string),"***Player %s(%d) Has Created A Gang %s[GANGID:- %d]",pName(playerid),playerid,params,Gangid); SendClientMessageToAll(Green,string); PlayerDat[playerid][InGang] = 1; GangDat[Gangid][FileExists] = true; LoginPlayerAgain(playerid); return 1; }