So, habe mal ein paar Fragen, da mir das Reallife Script zu viel Aufwand ist und für Anfänger noch zu schwierig, wollte ich ein DM Script machen.
Ichw erde die Fragen immer wieder editieren, wenn ich neue habe.
1. Wie mache ich das , das man sieht, wenn einer einen andren killt?(also die anzeige)
2. Woher bekomme ich eine Uhr?3. Wie kann ich das machen, das nur die Terroristen in ihre autos können und die soldaten nur in ihre?
4.
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 233.3517,1932.5850,33.8984,359.9752); // Setz die Positon( Vom Spieler auf, x, y, z);
SetPlayerCameraPos(playerid, 233.3517,1932.5850,33.8984,359.9752); // Richte die Kamera( Vom Spieler auf, x, y,z);
SetPlayerCameraLookAt(playerid, 233.3517,1932.5850,33.8984,359.9752); // Setze die Blickrichtung der Kamera( des Spielers auf, x, y, z);
return 1;
}
Möchte die Kamera bei der Skin Auswahl auf den Fluss bei Ballas machen, wie geht das? bitte code senden.
mfg
5. Wie kann ich machen, das man unendlich ausdauer hat?(also man kann die ganze zeit rennen)
6.wie mache ich, das auf der karte keine showmes mehr sind? weil jeder der connectet, bekommt ein showme, was aber nicht soll.
7. Wie erstelle ich das command /heal, welches man nur an der base der jenigen gangs machen kann?
8.
new string[256];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new cmd[256];
new giveplayerid, moneys, idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/help", true) == 0) {
SendPlayerFormattedText(playerid,"Gangwar Gamemode made by Arne.",0);
SendPlayerFormattedText(playerid,"Type: /whattodo to see what you have to do in this gamemode .",0);
SendPlayerFormattedText(playerid,"Type: /commands to see your commands.",0);
SendPlayerFormattedText(playerid,"Type: /tips to see some tips.", 0);
return 1;
}
if(strcmp(cmd, "/whattodo", true) == 0) {
SendPlayerFormattedText(playerid,"This gamemode is a Reallife Gamemode, so please, play like in your normal life.",0);
SendPlayerFormattedText(playerid,"In this Gangwar gamemode, you have to buy drugs at the Police Department(garage)",0);
SendPlayerFormattedText(playerid,"and have to save the drugs in your savebox at your base.",0);
SendPlayerFormattedText(playerid,"Other gang can steal your drugs, if you see them, kill them!", 0);
SendPlayerFormattedText(playerid,"Also you can steal drugs from other gangs.", 0);
return 1;
}
if(strcmp(cmd, "/commands", true) == 0) {
SendPlayerFormattedText(playerid,"Here you can see your commands.",0);
SendPlayerFormattedText(playerid,"/givecash(to give money to other players",0);
SendPlayerFormattedText(playerid,"/kill(to kill yourself(only if you want to change your gang!))",0);
SendPlayerFormattedText(playerid,"/me to show your emotes", 0);
SendPlayerFormattedText(playerid,"/heal to heal yourself(who makes it at a fight, will be kicked(its no reallife!)", 0);
return 1;
}
if(strcmp(cmdtext, "/me", true)==0) {
new str[256], sname[256];
GetPlayerName(playerid, sname, 256);
format(str, 256, "%s %s", sname, cmdtext[4]);
SendClientMessageToAll(0x33CCFFAA, str);
return 1;
}
if(strcmp(cmd, "/heal", true) == 0) {
SetPlayerHealth(id, 100.0);
SendClientMessage(id, 0x00FF00AA, "You have been healed(dont use it in a fight!)");
return 1;
}
if(strcmp(cmd, "/givecash", true) == 0) {
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givecash [playerid] [amount]");
return 1;
}
giveplayerid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givecash [playerid] [amount]");
return 1;
}
moneys = strval(tmp);
if (IsPlayerConnected(giveplayerid)) {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playermoney = GetPlayerMoney(playerid);
if (moneys > 0 && playermoney >= moneys) {
GivePlayerMoney(playerid, (0 - moneys));
GivePlayerMoney(giveplayerid, moneys);
format(string, sizeof(string), "You have sent %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "You have recieved $%d from %s(player: %d).", moneys, sendername, playerid);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
printf("%s(playerid:%d) has transfered %d to %s(playerid:%d)",sendername, playerid, moneys, giveplayer, giveplayerid);
}
else {
SendClientMessage(playerid, COLOR_YELLOW, "Invalid transaction amount.");
}
}
else {
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}
// PROCESS OTHER COMMANDS
return 0;
}
Alles anzeigen
Was ist daran falsch? bekomme 26 Errors:
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(202) : error 003: declaration of a local variable must appear in a compound block
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(209) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(211) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(213) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(214) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(215) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(216) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(218) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(220) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(221) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(222) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(223) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(224) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(226) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(228) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(229) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(230) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(231) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(232) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(234) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(236) : error 021: symbol already defined: "GetPlayerName"
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(239) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(241) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(244) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(247) : error 010: invalid function or declaration
D:\GTASAN~1\SAMP02~1.WIN\GAMEMO~1\Reallife.pwn(249) : error 010: invalid function or declaration
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.
Alles anzeigen
9. Wie mache ich, das man einen Score bekommt, wenn man einen Player killt? bzw. wenn man stirbt - Score bekommt?