01.12.2012, 15:35
i'm making Mask Script And i have problems please help me!
i have it in OnPlayerText.
And..
it In OnPlayerCommandText.
And i have this errors:
please help me how to fix it!
Код HTML:
public OnPlayerText(playerid, text[]) { if(Masked[playerid]) { new string[128];// This is string what we use. format(string, sizeof(string), "Stranger says, \"%s\"", text); //This is when you masked and you start to speake SendClientMessage(playerid, COLOR_WHITE, string); // This is message what send to player near you, you can change color if you want. return 0; } return 1; }
And..
Код HTML:
if(strcmp(cmd, "/Mask", true, 10) == 0) { new randomID = random(200); new string[35]; isStranged[playerid] = true; GetPlayerName(playerid, string, sizeof(string)); strmid(OldUsername[playerid], string, 0, strlen(string), 64); format(string,sizeof(string), "Ucnobi", randomID); SetPlayerName(playerid, string); SetPlayerAttachedObject(playerid, 1, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);//You can change this however you want, use sa-mp wiki for more info, right now is HockeyMask2 SendClientMessage(playerid, COLOR_WHITE, "Shen Gaikete Maska! (Daweret /mask Rom Moixsnat Is.)"); for(new i = 0; i < MAX_PLAYERS; i++) { ShowPlayerNameTagForPlayer(i, playerid, 0); // ShowPlayerNameTagForPlayer(i, playerid, 0) hide name for all players } } else { SetPlayerName(playerid, OldUsername[playerid]); // SetPlayerName back your Roleplay name isStranged[playerid] = false; // When is isStranged = false you speake normaly SendClientMessage(playerid, COLOR_WHITE, "Shen Moixseni Maska!"); // This is message what was send when you remove your mask if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1); // This line is for Object what we attached, when you write /mask this remove it. for(new i = 0; i < MAX_PLAYERS; i++) { ShowPlayerNameTagForPlayer(i, playerid, 1); // ShowPlayerNameTagForPlayer(i, playerid, 1) show name back. } } return 1; } return 0; }
And i have this errors:
Код HTML:
C:\BIG CITY LIFE\gamemodes\Server.pwn(789) : error 029: invalid expression, assumed zero C:\BIG CITY LIFE\gamemodes\Server.pwn(789) : warning 215: expression has no effect C:\BIG CITY LIFE\gamemodes\Server.pwn(789) : error 001: expected token: ";", but found "]" C:\BIG CITY LIFE\gamemodes\Server.pwn(789) : error 029: invalid expression, assumed zero C:\BIG CITY LIFE\gamemodes\Server.pwn(789) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.