I am so new at this, and I want to make this message pop up when people log in, but I get this?
Код:
#include <a_samp>
#include <core>
#include <float>
#define COLOR_GREEN #FF9900
#pragma tabsize 0
main()
{
print("\n----------------------------------");
print(" Bare Script\n");
print("----------------------------------\n");
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome to my server!");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new idx;
new cmd[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/yadayada", true) == 0) {
return 1;
}
return 0;
}
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,0);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
SetupPlayerForClassSelection(playerid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
return 1;
}
public OnGameModeInit()
{
SetGameModeText("Bare Script");
ShowPlayerMarkers(1);
ShowNameTags(1);
AllowAdminTeleport(1);
AddPlayerClass(294,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
AddStaticVehicle(490,1534.3583,-1678.9122,13.5115,90.4127,0,0); // FBI Rancher (Valid)
AddStaticVehicle(522,1535.9368,-1676.2644,12.9566,41.9196,3,8); // LSPD NRG Spawn
AddStaticVehicle(522,1535.8353,-1674.0121,12.9476,38.4153,6,25); // LSPD NRG Spawn
AddPlayerClass(0,1548.6698,-1675.5918,14.6261,91.2319,0,0,0,0,0,0); // LSPD Player Spawn
CreateObject(3975,1964.80004883,-636.40002441,63.00000000,0.00000000,0.00000000,0.00000000); //object(policest01_lan) (1)
CreateObject(10821,392.29998779,-1678.09997559,95.19999695,0.00000000,0.00000000,0.00000000); //object(baybridge2_sfse) (1)
CreateObject(971,2506.50000000,-1460.59997559,25.10000038,2.00000000,0.00000000,90.00000000); //object(subwaygate) (1)
CreateObject(10281,2507.80004883,-1462.09997559,29.60000038,0.00000000,328.00000000,84.00000000); //object(michsign_sfe) (1)
CreateObject(971,2506.39990234,-1451.80004883,24.10000038,2.00170898,179.99993896,90.00100708); //object(subwaygate) (2)
CreateObject(8615,2474.50000000,-1464.19995117,25.70000076,0.00000000,0.00000000,0.00000000); //object(vgssstairs04_lvs) (1)
CreateObject(1764,2510.69995117,-1472.00000000,23.00000000,0.00000000,0.00000000,138.00000000); //object(low_couch_2) (2)
CreateObject(947,2512.19995117,-1455.40002441,25.20000076,0.00000000,0.00000000,180.00000000); //object(bskballhub_lax01) (1)
CreateObject(971,2446.39990234,-1460.69995117,26.29999924,1.99951172,0.00000000,90.00000000); //object(subwaygate) (3)
CreateObject(854,2516.10009766,-1474.50000000,23.20000076,0.00000000,0.00000000,0.00000000); //object(cj_urb_rub_3b) (1)
CreateObject(1764,2509.30004883,-1469.30004883,23.00000000,0.00000000,0.00000000,33.99914551); //object(low_couch_2) (3)
CreateObject(1516,2511.39990234,-1470.09997559,23.00000000,0.00000000,0.00000000,0.00000000); //object(dyn_table_03) (1)
return 1;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
Then copy the ID without the #, Then place 0x infront of the code and FF at the end.