- 0
Problema comanda /invite.
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Masodion
Problema intalnita (descriere): Am incercat sa fac comanda /invite (copiata dintr-un alt gamemode) si imi da erorile de mai jos.
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul(obligatoriu):
//----------------------------------[INVITE]------------------------------------------------ if(strcmp(cmd, "/invite", true) == 0) { if(IsPlayerConnected(playerid)) { temp = strtok(cmdtext, idx); if(!strlen(temp)) { SendClientMessage(playerid, COLOR_GRAD2, "{55D4FF}SCRIE:{B4B4B4} /invite [playerid/PartOfName]"); return 1; } new para1; new ftext[20]; para1 = ReturnUser(temp); if (PlayerInfo[playerid][pLeader] >= 1 || PlayerInfo[playerid][pRank] == 6) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255 || PlayerInfo[para1][pLeader] == 0) { if(PlayerInfo[para1][pJob] > 0) { SendClientMessage(playerid, COLOR_GREY, " Can't invite him, player has a Job !"); return 1; } if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Force"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); } else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "S.R.I/ATF"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); } else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Armata Romana"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); } else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Fireman/Ambulance"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); } else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Frusin"; ChosenSkin[para1] = 124; SetPlayerSkin(para1, 124); } else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Racean"; ChosenSkin[para1] = 120; SetPlayerSkin(para1, 120); } else { return 1; } GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader]; PlayerInfo[para1][pRank] = 1; printf("News: %s has invited %s to join %s.", sendername, giveplayer, ftext); format(string, sizeof(string), " You have Joined the %s, you were invited by Leader %s", ftext, sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), " You have Invited %s to join the %s.", giveplayer,ftext); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); SetPlayerInterior(para1,0); new rand = random(sizeof(gInviteSpawns)); SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]); SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]); SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); TogglePlayerControllable(para1, 0); SelectChar[para1] = 255; SelectCharID[para1] = PlayerInfo[para1][pMember]; SelectCharPlace[para1] = 1; PlayerInfo[para1][pModel] = ChosenSkin[para1]; PlayerInfo[para1][pChar] = ChosenSkin[para1]; SendClientMessage(para1, COLOR_LIGHTRED, "* Use 'next' to Select the char you want to use."); SendClientMessage(para1, COLOR_LIGHTRED, "* If you've found the Char you want to use, type 'done'."); } else { SendClientMessage(playerid, COLOR_GREY, " That player is currently Wanted / a Different Team / or already a Family Member."); return 1; } } }//not connected } else { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command(leaders only)!"); } } return 1; }Imagini / Video (optional): Nu cred ca aveti nevoie.
Ati incercat sa rezolvati singur?:Da. La linia 2088 am asa "giveplayer " . In gamemode de unde am luat comanda am la "giveplayer "
enum cCKInfo { cSendername[20], cGiveplayer[20], cUsed, };Folosesc gamemode http://www.sa-mp.ro/forums/topic/19086-mysql-r33-ideal-pentru-rpg/ . Si in "accounts.inc" am alea cu pInfo si am incercat sa adaug enum cCKInfo
cum e si mai sus si nu imi merge. Ce ar trebui sa-i fac?
Edited by Masodion8 answers to this question
Recommended Posts