01.01.2011, 07:11
How do i make it so that if someone enters the wrong password it says Wrong Password
also what is wrong with this script
also what is wrong with this script
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
new locked[MAX_PLAYERS];
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnGameModeInit()
{
AddPlayerClass(294, 0, 0, 0, 130, 24, 300, 0, 0, 0, 0); //Class 1 - Not passworded
AddPlayerClass(188, 0, 0, 0, 130, 24, 300, 0, 0, 0, 0); //Class 2 - Passworded
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0: Locked[playerid] = 1; //this one DOESNT.
case 1: Locked[playerid] = 1; //this one too
}
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(Locked[playerid]) return 0;
//If player's current class is passworded, stop them from spawning
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/unlock test "))
{
Locked[playerid] = 0;
SendClientMessage(playerid, COLOR_GREEN, "Skins unlocked!");
}
return 1